Use one of the following procedures to issue a remote procedure call.
Remote procedures accept input parameters up to 254 bytes in length, and return up to 254 characters in output variables.
If a remote procedure can return a result set, even if it does not return one in all cases, then the local procedure definition must contain a RESULT clause.
To create a remote procedure (Sybase Central)
Connect to the host database as a user with DBA authority.
In the left pane, double-click Remote Servers.
Select the remote server, and in the right pane click the Remote Procedures tab.
From the File menu, choose New » Remote Procedure.
Follow the instructions in the Create Remote Procedure Wizard.
To create a remote procedure (SQL)
Connect to the database as a user with DBA authority.
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'; |
For more information, see CREATE PROCEDURE statement.
To issue a remote procedure call (SQL)
Connect to the database as a user with DBA authority.
Execute the procedure as follows:
CALL remotewho(); |
This example 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:
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |