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

REVOKE PUBLISH statement [SQL Remote]

Terminates the identification of the named user ID as the current publisher. You must have the SYS_REPLICATION_ADMIN_ROLE system role to revoke publisher rights.

Syntax
REVOKE PUBLISH FROM userid
Remarks

Each database in a SQL Remote installation is identified in outgoing messages by a publisher user ID. The current publisher user ID can be determined by querying the CURRENT PUBLISHER special value as follows:

SELECT CURRENT PUBLISHER;

The REVOKE PUBLISH statement ends the identification of the named user ID as the publisher. To change publishers, you must REVOKE PUBLISH from the current publisher, and then GRANT PUBLISH to the new publisher.

If you change the publisher user ID at any consolidated or remote database in a SQL Remote installation, you must ensure that the new publisher user ID is granted REMOTE privilege on all databases receiving messages from the database. Making this change requires all subscriptions to be dropped and recreated.

Do not revoke the publisher while the database has active SQL Remote publications or subscriptions.

Revoking publisher and not granting it to a new user has consequences for a SQL Remote installation:

  • You cannot insert data into any tables with a CURRENT PUBLISHER column as part of the primary key. Any outgoing messages are not identified with a publisher user ID, and so are not accepted by recipient databases.

Executing this statement changes the value of the PUBLIC.db_publisher database option.

Privileges

You must have the SET ANY SYSTEM OPTION system privilege.

Side effects

Automatic commit.

Standards
  • ANSI/ISO SQL Standard

    Not in the standard.

Example

Terminate the identification of publisher_ID as the current publisher.

REVOKE PUBLISH FROM publisher_ID;