1 2 /* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */3 4 /*
5 ** Omni only
6 */7 createproceduresp_remotesql8 @server varchar(255),/* name of remote server */9 @query varchar(255)/* statement to be executed on remote server */10 /*
11 ** The caller may supply up to 250 additional arguments of type
12 ** char or varchar. These will be concatenated to the end of the
13 ** query buffer initialized by the @query arg. This query buffer
14 ** is passed directly to server '@server', where it is executed.
15 ** Any and all results are passed directly back to Omni's client.
16 */17 as18 if @@error > 0
19 return @@error
20
exec sp_procxmode 'sp_remotesql', 'AnyMode'
go
Grant Execute on sp_remotesql to public
go