The sp_passthru System Procedure

sp_passthru allows the user to pass a SQL command buffer to a remote server.

The syntax of the SQL statements being passed is assumed to be the syntax native to the class of server receiving the buffer; no translation or interpretation is performed. Results from the remote server are optionally placed in output parameters. The syntax for sp_passthru is:

sp_passthru server, command, errcode, errmsg, rowcount
 [, arg1, arg2, ... argn]
where:
This example returns the date from the Oracle server in the output parameter @oradate. If an Oracle error occurs, the error code is placed in @errcode and the corresponding message is placed in @errmsg. The @rowcount parameter is set to 1.
sp_passthru ORACLE, "select date from dual", @errcodeoutput, @errmsg output, @rowcount output, @oradate output