Executing a SQL Server stored procedure  Rules for using language statements as RPCs

Chapter 7: Issuing Remote Procedure Calls

Executing a language statement as an RPC

To execute a SQL language statement to the DB2 access service through a SQL Server RPC, use the following syntax:

C:> isql -Ssqlserver -Uuser -Ppassword
 1> execute directconnect...dcon “select * from
 	user.authors”
 2> go

where:

The DB2 access service RPC event handler is sensitive to several key RPC names. In this case, the RPC keyword dcon is a special name that DirectConnect recognizes. As a result, the DB2 access service translates the first parameter into a dynamic SQL statement, submits it to the target database, and then returns the result set to the client application.

NoteFor backward compatibility with the MDI Database Gateway, pcsql is recognized in place of the dcon keyword. For backward compatibility with Net-Gateway, syrt is recognized in place of the dcon keyword.

To execute a language statement as an RPC:

  1. Adaptive Server determines if the remote server (in this case, directconnect) is configured as a remote server to Adaptive Server.

  2. Adaptive Server does one of the following:





Copyright © 2005. Sybase Inc. All rights reserved. Rules for using language statements as RPCs

View this book as PDF