Passthrough mode is a powerful tool, and should be used with care. Some statements, especially data definition statements, could cause a running SQL Remote setup to come tumbling down. SQL Remote relies on each database in a setup having the same objects: if a table is altered at some sites but not at others, attempts to replicate data changes will fail.
Also, it is important to remember that in the default setting passthrough mode also executes statements at the local database. To send statements to a remote database without executing them locally you must supply the ONLY keyword. When a passthrough session contains calls to stored procedures, the procedures must exist in the server that is issuing the passthrough commands, even if they are not being executed locally at the server. The following set of statements drops a table not only at a remote database, but also at the consolidated database.
-- Drop a table at the remote database -- and at the local database PASSTHROUGH TO Joe_Remote ; DROP TABLE CrucialData ; PASSTHROUGH STOP ;
The syntax to drop a table at the remote database only is as follows:
-- Drop a table at the remote database only PASSTHROUGH ONLY TO Joe_Remote ; DROP TABLE CrucialData ; PASSTHROUGH STOP ;
The following are tasks that can be carried out on a running SQL Remote setup:
Add new users.
Drop users from the setup.
Change the address, message type, or frequency for a remote user.
Add a column to a table.
Many other schema changes are likely to cause serious problems if executed on a running SQL Remote setup.
In a multi-tier SQL Remote installation, it becomes important that passthrough statements work on the level of databases immediately beneath the current level. In a multi-tier installation, passthrough statements must be entered at each consolidated database, for the level beneath it.