Changing primary databases to replicate databases

Use the following procedure to change a primary database to a replicate database:

  1. Drop all subscriptions to the replication definitions in this database.

  2. Drop all replication definitions and functions defined for this database.

  3. Shut down the LTM.

  4. Log in to the Replication Server that manages the database and execute the alter connection command using the log transfer off option:

    alter connection to data_server.database
    set log transfer off
    
  5. Log in to the SQL Server and set the LTM truncation point for the database to “ignore”:

    use database
    go
    dbcc settrunc('ltm', 'ignore')
    go
    
  6. Set the status of rs_marker to “false” using the sp_setrepproc system procedure.

    sp_setrepproc rs_marker, 'false'
    
  7. Set the replicate status of all replicated objects to “false”. To do this:

    1. Execute sp_setreptable and sp_setrepproc without any arguments to generate a list of all replicated tables and stored procedures in the database.

    2. One by one, set the replicate status of each table and stored procedure to “false,” using sp_setreptable and sp_setrepproc.