Verifying that the Replication System Is Ready Before You Create Subscriptions

Before creating subscriptions, verify that the replication system is ready.

  1. Verify that all components in the replication system are working. See Replication Server Administration Guide Volume 2 > Verify and Monitor Replication Server > Verify a Replication System for details.
  2. Make sure the following database objects and permissions exist:
    • One or more replication definitions exist for the primary table.

    • The primary table is marked as replicated with sp_setreptable or sp_reptostandby for warm standby applications.

    • A table corresponding to the replication definition exists in the replicate database. Its columns must match those specified for the replicate database in the replication definition. Its datatypes must match the corresponding primary columns.

      This table must also be visible to the user creating the subscription and the user maintaining it. If an owner name is included in the replication definition, the table must be visible to all database users. If an owner name is not included in the replication definition, the easiest way to make the table accessible is to have the Database Owner create it.

    • The replicate database maintenance user must have:

      select, insert, update, and delete permissions on the replicate table, and execute permission for functions used in replication.

      If the subscription for the table includes the subscribe to truncate table clause, the maintenance user must have replication_role, sa_role, or alias the Database Owner.

  3. Make sure that you meet recommended guidelines for the character sets and sort orders used throughout your replication system. These play an important role in processing subscriptions, and they must be consistent everywhere for subscriptions to be valid. Refer to the Replication Server Design Guide for guidelines.
  4. Choose one of the subscription materialization methods and verify the following requirements for your chosen method:
    • For nonatomic materialization, you must enable autocorrection for the replicate table. See Replication Server Reference Manual > Replication Server Commands for set autocorrection command details.

      If the replicate minimal columns feature is set for the replication definition, you cannot create new subscriptions using nonatomic materialization.

    • For atomic and nonatomic materialization:

      A default function-string class or a function-string class inherited from a default function-string class generates default function strings for the rs_select_with_lock or rs_select functions. If you use other function-string classes, you must create function strings for the rs_select_with_lock or rs_select functions, with an input template that matches the subscription’s where clause.

      To modify rs_select or rs_select_with_lock, use a function from the function string class associated with the primary database connection, not the functions in the replicate database connection.

      See Replication Server Administration Guide Volume 2 > Customize Database Operations > Function-string Classes and Replication Server Administration Guide Volume 2 > Customize Database Operations > Managing Function Strings > Using Input Templates for details.

    • If you are creating a subscription with either atomic or non-atomic materialization methods and you have columns that require quoted identifiers in the replication definition, you must configure the primary connection to use quoted identifiers.

    • If you are using quoted identifiers with a custom function string that includes a quoted constant, create subscription without a quoted constant or without materialization clause. Otherwise, during subscription materialization the quoted constant causes a query failure. The replicate data server identifies the quoted constant as a column instead of a constant.

  5. When you create subscriptions, use the login name of a regular user. Do not create subscriptions as the maintenance user.
    Make sure the user creating the subscription has the following login names and permissions:
    • Same login name and password at the replicate Replication Server, the primary Replication Server, and the primary data server. If you are using bulk materialization or the no-materialization method, you are not required to have a login name for the primary data server.

    • select permission on the primary table. This does not apply if you are using bulk materialization or no materialization.

    • execute permission on the rs_marker stored procedure in the primary database or no materialization.

    • create object or sa permission in the replicate Replication Server.

    • primary subscribe, create object, or sa permission in the primary Replication Server.

Related concepts
Autocorrection for Nonatomic Materialization
Related reference
Subscription Materialization Methods