Changing replicate databases to primary databases

This section describes how to change a database that is designated as “replicate only” to be a source of asynchronous transactions or to contain primary data.

  1. A the Replication Server managing the database, create RS_user so that the LTM can log in to the Replication Server.

    Use the create user command:

    create user RS_user_name
    set password {RS_password | null}
    

    where RS_user_name and RS_password are the name and password the LTM uses to connect to Replication Server.

    Grant this user connect source permission, using the grant command:

    grant connect source to RS_user_name
    

    If the Replication Server already manages a primary database, you can use the “RepAgent user” that already exists for the new primary database.

  2. At the SQL Server, create SQL_user so that the LTM can log in to the SQL Server. Grant SQL_user dbo permission or replication_role.

    See the SYBASE SQL Server System Administration Guide for information about creating users and granting permissions in SQL Server.

  3. At the Replication Server that manages the database, execute the alter connection command using the log transfer on option:

    alter connection to data_server.database
    set log transfer on
    
  4. At the SQL Server, set the LTM truncation point for the database to “valid”:

    use database
    go
    dbcc settrunc('ltm', 'valid')
    go
    
  5. Add an interfaces file entry for the LTM that will read the SQL Server log of this new primary database.

    Use dsedit to modify the interfaces file. See the installation guide for your platform for more information.

  6. In the SQL Server, create the rs_marker stored procedure and set its replicate status to “true,” using the sp_setrepproc system procedure. You can find the rs_marker stored procedure in the file rs_install_primary.sql or rsinssys.sql in the scripts directory of the SYBASE release directory.

  7. Create an LTM configuration file and start the LTM.