Collection Contents Index Sending native statements to remote servers Transaction management and remote data pdf/chap28.pdf

User's Guide
   PART 4. Database Administration and Advanced Use
     CHAPTER 28. Accessing Remote Data       

Using remote procedure calls (RPCs)


Adaptive Server Anywhere users can issue procedure calls to remote servers that support the feature.

Sybase Adaptive Server Anywhere and Adaptive Server Enterprise, Oracle, and DB2 support this feature. Issuing a remote procedure call is similar to using a local procedure call.

  To issue a remote procedure call:
  1. First define the procedure to Adaptive Server Anywhere.

    The syntax is the same as a local procedure definition except instead of using SQL statements to make up the body of the call, a location string is given defining the location where the procedure resides.

    CREATE PROCEDURE remotewho ()
    AT 'bostonase.master.dbo.sp_who'
  2. Execute the procedure as follows:

    call remotewho()

Here is an example with a parameter:

CREATE PROCEDURE remoteuser (IN uname char(30))
AT 'bostonase.master.dbo.sp_helpuser'
call remoteuser('joe')

Collection Contents Index Sending native statements to remote servers Transaction management and remote data pdf/chap28.pdf