Contents Index GRANT CONSOLIDATE statement [SQL Remote] GRANT REMOTE statement [SQL Remote]

ASA SQL Reference
  SQL Statements

GRANT PUBLISH statement [SQL Remote]


Description 

Use this statement to identify the publisher of the current database.

Syntax 

GRANT PUBLISH TO userid

Usage 

Each database in a SQL Remote installation is identified in outgoing messages by a user ID, called the publisher. The GRANT PUBLISH statement identifies the publisher user ID associated with these outgoing messages.

Only one user ID can have PUBLISH authority. The user ID with PUBLISH authority is identified by the special constant CURRENT PUBLISHER. The following query identifies the current publisher:

SELECT CURRENT PUBLISHER

If there is no publisher, the special constant is NULL.

The current publisher special constant can be used as a default setting for columns. It is often useful to have a CURRENT PUBLISHER column as part of the primary key for replicating tables, as this helps prevent primary key conflicts due to updates at more than one site.

In order to change the publisher, you must first drop the current publisher using the REVOKE PUBLISH statement, and then create a new publisher using the GRANT PUBLISH statement.

Permissions 

Must have DBA authority.

Side effects 

Automatic commit.

See also 

GRANT PUBLISH statement [SQL Remote]

GRANT CONSOLIDATE statement [SQL Remote]

REVOKE PUBLISH statement [SQL Remote]

CREATE SUBSCRIPTION statement [SQL Remote]

sp_publisher procedure

Example 
GRANT PUBLISH TO publisher_ID

Contents Index GRANT CONSOLIDATE statement [SQL Remote] GRANT REMOTE statement [SQL Remote]