Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

PASSTHROUGH statement [SQL Remote]

Starts or stops passthrough mode for SQL Remote administration.

Syntax
  • Start passthrough for a user ID
    PASSTHROUGH [ ONLY ] FOR userid, ...
    
  • Start passthrough all subscribers to a publication
    PASSTHROUGH [ ONLY ] FOR SUBSCRIPTION
    TO [ owner. ]publication-name [ ( constant ) ]
    
  • Stop passthrough
    PASSTHROUGH STOP
Remarks

In passthrough mode, any SQL statements are executed by the database server, and are also placed into the transaction log to be sent in messages to subscribers. If the ONLY keyword is used to start passthrough mode, the statements are not executed at the server; they are sent to recipients only. 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 recipients of the passthrough SQL statements are either a list of user IDs or all subscribers to a given publication. Passthrough mode may be used to apply changes to a remote database from the consolidated database or send statements from a remote database to the consolidated database.

Starting passthrough for subscribers of a publication sends statements to remote databases whose subscriptions are started, and does not send statements to remote databases whose subscriptions are created and not started.

PASSTHROUGH STOP stops passthrough mode on the current connection. You must execute the PASSTHROUGH STOP statement on the same connection that initiated the passthrough mode. If start passthrough mode on a connection and it disconnects before a PASSTHROUGH STOP statement is executed, the disconnect implicitly executes a PASSTHROUGH STOP statement.

Privileges

You must have the SYS_REPLICATION_ADMIN_ROLE system role.

Side effects

None.

Standards
  • ANSI/ISO SQL Standard

    Not in the standard.

Example

PASSTHROUGH FOR Sam_Singer ;
...
( SQL statements to be executed at the remote database )
...
PASSTHROUGH STOP ;