Resetting Primary Database Generation Number

Learn how to reset database generation numbers.

In this procedure, the primary database refers to the primary database where you want to reset the database generation number.

  1. At the replicate Replication Server, drop all subscriptions that reference replication definitions and publications defined for the connection to the primary database.
  2. Drop all publications referenced by the subscriptions you dropped in step 1.
  3. Drop all articles referenced by the publications you dropped in step 2.
  4. In the primary Replication Server, drop all replication definitions for the primary database connection.
  5. In the primary Replication Server, drop the connection to the primary database, and all connections to replicate databases that subscribe to the primary database.
  6. Set the database generation number to 0 on the primary database:
    • In Adaptive Server:

      dbcc settrunc(‘ltm’, ‘gen_id’, 0)
    • In Replication Agent for IBM DB2 UDB on UNIX and Windows, Microsoft SQL Server, and Oracle:

      pdb_gen_id 0
  7. In the primary Replication Server, create a new connection to the primary database, and create connections to the replicate databases.
  8. Re-create all the replication definitions, publications, articles, and subscriptions you dropped. See Replication Server Administration Guide Volume 1 > Manage Replication Environment with Sybase Central > Set up a Replication Environment.