Subscription Commands

Learn how to manage subscriptions with RCL commands.

You can use RCL commands or Sybase Central to:
  • Create subscriptions for atomic and nonatomic materialization and for the no-materialization method.

  • Define, activate, and validate subscriptions for bulk materialization.

  • Check the status of subscriptions during the materialization process.

  • Drop subscriptions to initiate the dematerialization process.

  • Enable replication of the truncate table command when you create or define a subscription.

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.

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.

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 when you create replicated functions. 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.

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.

validate subscription

Third step in bulk materialization. Changes the subscription status at both the primary and replicate sites to VALID.

check subscription

Verifies the status of a subscription at both the primary and replicate sites. Use this command with all types of subscription materialization.

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.

Related concepts
Manage Replicated Functions
Enable Replication of truncate table
Related reference
Commands for Managing Table Replication Definitions
Commands for Managing Function Replication Definitions