Using subscription commands

You can use RCL commands or Sybase Central to:

You can use a where clause to control which table rows or function invocations to replicate. The where clause can specify only the searchable columns or searchable parameters specified in the table or function replication definition. If you do not provide a where clause, all the rows of the replication definition’s columns, or all the function invocations, are replicated. See “Using the where clause” for more information.

If you are using Adaptive Server Enterprise version 11.5 or later, you can include the subscribe to truncate table keywords to reproduce execution of the truncate table command at the destination database. See “Enabling replication of truncate table” for more information.

Table 11-3 lists the Replication Server commands for working with subscriptions. Also see Table 9-1 and Table 10-1.

Table 11-3: Commands for managing subscriptions

Command

Task

create subscription

Creates a subscription that transfers the initial version of the replicated data using either:

  • Atomic materialization, which copies the initial version of the data for a subscription as a single transaction, or

  • Nonatomic materialization, which copies the data in a series of transactions. Users at the replicate site can see some of the data before it all arrives. Replication Server does not create a materialization queue for the entire set of subscription data.

Use create subscription with the without materialization clause to activate a subscription for which the initial version of the replicated data already exists at the replicate database. You can also use create subscription to create subscriptions for table replication definitions. Use create subscription, with the without materialization clause, for function replication definitions.

define subscription

The first step in bulk materialization defines a subscription. You can use define subscription and the other bulk materialization commands to create subscriptions for either table or function replication definitions. You must transfer data manually, as necessary. Data replication begins after materialization is complete and a subscription is activated and validated. Use check subscription to verify subscription status. See “Using the check subscription command” for details. See Chapter 10, “Managing Replicated Functions.”

activate subscription

Second step in bulk materialization. Activates a subscription at both primary and replicate Replication Servers. This causes the primary Replication Server to start sending changes to the subscription’s data to the replicate Replication Server. See “Using the activate subscription command” for details.

validate subscription

Third step in bulk materialization. Changes the subscription status at both the primary and replicate sites to VALID. See “Using the validate subscription command” for details.

check subscription

Verifies the status of a subscription at both the primary and replicate sites. Use this command with all types of subscription materialization. See “Using the check subscription command” for details.

drop subscription

Removes a subscription from the replication system. For subscriptions to table replication definitions, optionally removes subscription rows from the replicate table in a process known as dematerialization. See “Using the drop subscription command” for details.