activate subscription

Description

For a subscription to a replication definition or a publication, starts the distribution of updates from the primary to the replicate database and sets the subscription status to ACTIVE. This command is part of the bulk materialization process, or part of the process of refreshing a publication subscription.

Syntax

activate subscription sub_name
for { table_rep_def | function_rep_def |
	publication pub_name | database replication definition db_repdef
	with primary at data_server.database }
 with replicate at data_server.database
[with suspension [at active replicate only]]

Parameters

sub_name

The name of the subscription to be activated.

for table_rep_def

Specifies the name of the table replication definition the subscription is for.

for function_rep_def

Specifies the name of the function replication definition the subscription is for.

for publication pub_name

Specifies the name of the publication the subscription is for.

for database replication definition db_repdef

Specifies the name of the database replication definition the subscription is for.

with primary at data_server.database

Specifies the location of the primary data. If the primary database is part of a warm standby application, data_server.database is the name of the logical data server and database. Use this clause only with a subscription for a publication.

with replicate at data_server.database

Specifies the location of the replicate data. If the replicate database is part of a warm standby application that uses logical connections, data_server.database is the name of the logical data server and database.

with suspension

Suspends the Data Server Interface (DSI) for the replicate database after changing the subscription status. While the DSI is suspended, Replication Server holds updates for the replicate database in a stable queue. After you load the initial data and resume the DSI, Replication Server applies the updates. In a warm standby application, this clause suspends the active database DSI and the standby DSI.

with suspension at active replicate only

In a warm standby application, suspends the active database DSI but not the standby DSI.

Examples

Example 1

Activates the subscription titles_sub for the table replication definition titles_rep, where the replicate database is SYDNEY_DS.pubs2. This command suspends the DSI.

activate subscription titles_sub
 for titles_rep
 with replicate at SYDNEY_DS.pubs2
 with suspension

Example 2

Activates the subscription myproc_sub for the function replication definition myproc_rep, where the replicate database is SYDNEY_DS.pubs2.

activate subscription myproc_sub
 for myproc_rep
 with replicate at SYDNEY_DS.pubs2

Example 3

Activates the subscription pubs2_sub for the publication pubs2_pub, where the primary database is TOKYO_DS.pubs2 and the replicate database is SYDNEY_DS.pubs2.

activate subscription pubs2_sub
 for publication pubs2_pub
 with primary at TOKYO_DS.pubs2
 with replicate at SYDNEY_DS.pubs2

Usage


The with suspension clause

Permissions

activate subscription can be executed by users with “create object” permission at the replicate Replication Server and “primary subscribe” permission at the primary Replication Server.

See also

check subscription, create subscription, define subscription, drop subscription, resume connection, validate subscription