ASA SQL User's Guide
Accessing Remote Data
Using remote procedure calls (RPCs)
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.
To issue a remote procedure call (Sybase Central)
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
The Remote Procedure Creation wizard appears.
Follow the instructions in the wizard.
To issue a remote procedure call (SQL)
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'
Execute the procedure as follows:
call remotewho()
For more information, see CREATE PROCEDURE statement.
Here is an example with a parameter:
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. Other data types are disallowed:
[ UNSIGNED ] SMALLINT
[ UNSIGNED ] INT
[ UNSIGNED ] BIGINT
TINYINT
REAL
DOUBLE
CHAR
BIT
NUMERIC and DECIMAL data types are allowed for IN parameters, but not for OUT or INOUT parameters.