Creating and Verifying the Subscription in Replication Server

Create a subscription and verify that it is valid both at the primary table and at the RepConnector connection in the Replication Server.

A subscription instructs Replication Server to copy data from the primary table to the specified RepConnector connection. The subscription describes the replicated information that RepConnector can accept.
  1. Create the subscription using the RepConnector connection name as the parameter value for the with replicate at command.
  2. Record this information on your worksheet:
    • Name of the RepConnector connection (3.a)

    • Name of the replication definition

  3. Create the database subscription:
    create subscription <subscription_name>
    for <replication_definition_name>
    with replicate at <dataserver>.<database>
    without materialization
    where:
    • subscription_name is the name of your subscription.

    • replication_definition_name is the name of the replication definition.

    • dataserver is the name of the database connection you created to connect to RepConnector.

    • database is the name of the database to which you are replicating.

      RepConnector does not actually use the database name; It is only a placeholder, used to meet Replication Server syntax requirements.

      Because a RepConnector connection is the destination instead of an actual database, Sybase recommends that you use a unique name that represents the RepConnector connection.

    For example:

    create subscription authors_sub
    for authors_rep
    with replicate at RepConnector.RepCondb
    without materialization
  4. Verify that the subscription is valid both at the primary database and the replicate database:
    check subscription <subscription_name>
    for <replication_definition_name>
    with replicate at <dataserver>.<database>
    where:
    • subscription_name is the name of the subscription.

    • replication_definition_name is the name of the table or function replication definition for which the subscription is created.

    • dataserver is the name of the RepConnector connection (line 3a).

    • database is the name of the database to which you are replicating.

      RepConnector does not actually use the database name; It is only a placeholder, used to meet Replication Server syntax requirements.

    For example:
    check subscription authors_sub
    for authors_rep
    with replicate at RepConnector.RepCondb