Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling remote sysbase procedure in sql server

Status
Not open for further replies.

minnyman

Programmer
Nov 13, 2001
6
US
Hi,

I am running SQL Server 2000 and have set up a linked Sybase ASE 12.1 Server using the linked server (LS) feature in SQL Server (using OLE DB Provider for ODBC Drivers). I would like to execute a remote procedure on this Sybase Server to return a recordset which I need to populate a table.

I have successfully configured the LS and am able to query data from tables and views. I also believe that I have setup the LS properly to run remote procedures, by checking the RPC Out box. However, when I try to execute remote stored procedures, I encounter syntax errors. This occurs even with basic system stored procedures, such as sp_who.

I am able to run the following system stored procedure when I use abbreviated syntax:

EXEC SIS...sp_who

Note: SIS is my linked server.


However, when I reference the stored procedure by its specific database and owner:

EXEC SIS.master.dbo.sp_who

I receive the following error message:

Server: Msg 7212, Level 17, State 1, Line 1
Could not execute procedure 'sp_who' on remote server 'SIS'.
[OLE/DB provider returned message: [DataDirect][ODBC Sybase Wire Protocol driver][SQL Server]Incorrect syntax near '?'.
]

I receive the same error when I try to execute non-system stored procedures.

The problem seems to be either with the Sybase syntax or the ODBC connection, but I can't figure it out.

Please help!

Thanks,

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top