Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Executing Sybase SP from MSSQL.

Author  Topic 

sqldba20
Posting Yak Master

183 Posts

Posted - 2009-09-16 : 16:23:27
Folks:

Need your help with this issue. When I run only the EXEC I get the output without any issues. This EXEC executes a Stored Procedure 'uspGenPrcQry' on Sybase Server SYBASEDBNAME (Link server is added on MSSQL) which is under database XYZDBNAME on Sybase.

EXEC ('XYZDBNAME.dbo.uspGenPrcQry
''9/15/2009'',''9/15/2009'',''PX'',''PSEC'',NULL,''OpsList'',''BANK''') AT SYBASEDBNAME



It FAILS if I try to put the output of this EXEC in a table on MSSQL. I have already enabled the 'network dtc', 'allow inbound', 'allow outbound','xa transactions' under Component Services -> MSDTC -> Security Configuration on both the servers (MSSQL and SYBASE).


CREATE TABLE #temp1(
Idf VARCHAR(50),
ID VARCHAR(50),
PrcTyp VARCHAR(50),
Qte_Dt DATETIME,
Prc DECIMAL(12,8),
Srce VARCHAR(50)
)

INSERT INTO #temp1
EXEC ('XYZDBNAME.dbo.uspGenPrcQry
''9/15/2009'',''9/15/2009'',''PX'',''PSEC'',NULL,''OpsList'',''BANK''') AT SYBASEDBNAME



ERROR:
OLE DB provider "MSDASQL" for linked server "SYBASEDBNAME" returned message "[DataDirect][ODBC Sybase Wire Protocol driver]Distributed transaction enlistment failed.".
OLE DB provider "MSDASQL" for linked server "SYBASEDBNAME" returned message "[DataDirect][ODBC Sybase Wire Protocol driver]RequestNewResourceManager failed.".
Msg 7391, Level 16, State 2, Line 10
The operation could not be performed because OLE DB provider "MSDASQL" for linked server "SYBASEDBNAME" was unable to begin a distributed transaction.






Thanks !
   

- Advertisement -