SQL Remote User's Guide
Command Reference for Adaptive Server Enterprise
To send a SQL statement in passthrough mode.
sp_passthrough statement
Argument | Description |
---|---|
statement | A string containing a statement to be executed in passthrough mode. |
sp_passthrough_piece procedure
sp_passthrough_subscription procedure
To send passthrough operations. The recipients of the passthrough statement are determined by previous calls to sp_passthrough_user and sp_passthrough_subscription.
The string must be less than 255 characters long. For SQL statements longer than 255 characters, you should execute a sequence of calls to the sp_passthrough_piece procedures, and execute sp_passthrough for the final piece of the statement and to cause the replication to occur.
Caution You should always test your passthrough operations on a test database with a remote database subscribed. You should never run untested passthrough scripts against a production database. |
The following statement sends a create table statement to the current recipients of passthrough statements.
exec sp_passthrough 'CREATE TABLE simple ( id integer NOT NULL, name char(50) )' go