Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
You can issue a remote procedure call using either Sybase Central or the CREATE PROCEDURE statement.
You must have DBA authority to create a remote procedure.
Connect to the host database from Sybase Central.
Open the Remote Servers folder.
In the left pane, select the remote server for which you want to create a remote procedure.
In the right pane, click the Remote Procedures tab.
From the File menu, choose New > Remote Procedure.
The Create Remote Procedure wizard appears.
Follow the instructions in the wizard.
Define the procedure to SQL Anywhere.
The syntax is the same as a local procedure definition, except instead of using SQL statements to make up the body of the procedure, a location string is given defining the location where the procedure resides.
CREATE PROCEDURE remotewho() AT 'bostonase.master.dbo.sp_who';
Execute the procedure as follows:
For more information, see CREATE PROCEDURE statement.
Here is an example that specifies a parameter when calling a remote procedure:
CREATE PROCEDURE remoteuser ( IN uname char( 30 ) ) AT 'bostonase.master.dbo.sp_helpuser'; CALL remoteuser( 'joe' );
The following data types are allowed for RPC parameters: