Creating Remote Procedures

Administrators can create remote procedures in Interactive SQL.

Prerequisites

You must have the MANAGE REPLICATION system privilege.

Task

If a remote procedure can return a result set, even if it does not always return one, then the local procedure definition must contain a RESULT clause.

  1. Connect to the host database.
  2. Execute a statement to define the procedure. For example:
    CREATE PROCEDURE RemoteWho()
    AT 'bostonase.master.dbo.sp_who'

This example specifies a parameter when calling a remote procedure:

CREATE PROCEDURE RemoteUser ( IN username CHAR( 30 ) )
AT 'bostonase.master.dbo.sp_helpuser';
CALL RemoteUser( 'joe' );