You can execute stored procedures on a remote Adaptive Server using RPCs if you have been granted access to the remote server and an appropriate database on that server. Remote execution of a stored procedure is a remote procedure call (RPC).
To obtain access to a remote server:
The remote server must be known to your local server. This occurs when the System Security Officer executes sp_addserver.
You must acquire a login on the remote server. This occurs when the System Administrator executes sp_addremotelogin.
You must be added as a user to the appropriate database on the remote server. This occurs when the Database Owner executes sp_adduser.
These procedures are discussed in the System Administration Guide.
When you can access the remote server, you can execute an RPC by qualifying the stored procedure name with the name of the remote server. For example, to execute sp_help on the GATEWAY server, enter:
GATEWAY...sp_help
Or, to fully qualify the name of the procedure, include the name of the database containing the procedure and the name of its owner, enter:
GATEWAY.sybsystemprocs.dbo.sp_help
In addition, if a System Security Officer has set up the local and remote servers to use network-based security services, one or more of the following functions may be in effect when you execute RPCs:
Mutual authentication – the local server authenticates the remote server by retrieving the credential of the remote server and verifying it with the security mechanism. With this service, the credentials of both servers are authenticated and verified.
Message confidentiality via encryption – messages are encrypted when sent to the remote server, and results from the remote server are encrypted.
Message integrity – messages between the servers are checked for tampering.
If you are using the unified login feature of network-based security, a System Security Officer can use sp_remoteoption on the remote server to establish you as a trusted user who does not need to supply a password to the remote server. If you are using Open Client™ Client-Library™/C, you can use ct_remote_pwd to specify a password for the remote server.
For more information about network-based security services, see the System Administration Guide.
Copyright © 2005. Sybase Inc. All rights reserved. |