Sybase DC38133-01-0902-01 manual Uses and limitations of passthrough mode

Models: DC38133-01-0902-01

1 485
Download 485 pages 33.95 Kb
Page 279
Image 279

Chapter 11. Administering SQL Remote for Adaptive Server Anywhere

Notes on using passthrough mode

messages, in the order in which the statements are recorded in the log.

Passthrough is commonly used to send data definition language statements. In this case, replicated DML statements use the before schema before the passthrough and the after schema following the passthrough.

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.

You should always qualify object names with the owner name. PASSTHROUGH statements are not executed at remote databases from the same user ID. Consequently, object names without the owner name qualifier may not be resolved correctly.

Uses and limitations of passthrough mode

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.

261

Page 279
Image 279
Sybase DC38133-01-0902-01 manual Uses and limitations of passthrough mode