You can use the following procedure to set up a warm standby application for an active database. In this procedure, an active database is already established. The procedure will be somewhat different if the active database has not yet been created. Make sure you review the warm standby information in the Replication Server Administration Guide Volume 1 before proceeding.
You must use Adaptive Server databases for this procedure.
Mark the entire active database for replication to the standby database with the sp_reptostandby stored procedure.
sp_reptostandby enables replication of data manipulation language (DML) and supported data definition language (DDL) commands and stored procedures. Refer to Chapter 3, “Managing Warm Standby Applications,” in the Replication Server Administration Guide Volume 2 for detailed information.
Reconfigure RepAgent using the sp_config_rep_agent stored procedure with the send_warm_standby_xacts option. Restart RepAgent.
Grant replication_role to the active database maintenance user.
On the active data server, add the maintenance user of the standby database to the active database, and grant replication_role to the new maintenance user. This step ensures that the maintenance user ID exists in the standby database after the database is loaded (step 8).
Log in to the Replication Server that is to manage the warm standby database, and create a logical connection for the active database, using the create logical connection command. The name of the logical connection must be the same as the name of the active database.
If you create the logical connection before you create the active database connection, use different names for the logical connection and the active database.
On the standby data server, create the standby database with the same size as the active database.
Use Sybase Central or rs_init to create the standby database connection. For more information, see the Replication Server online help and the Replication Server installation and configuration guide for your platform.
After the connection is created, log in to Replication Server and use the admin logical_status command to make sure that the new connection is “active.”
Initialize the standby database using dump and load without the rs_init “dump marker” option. (Or you can use bcp. Refer to the Replication Server Administration Guide Volume 2 for more information.)
On the Replication Server, suspend the active database connection.
If you cannot suspend the active database, use dump and load with the rs_init “dump marker” option.
On the active Adaptive Server, dump the active database.
Load the active database dump into the standby database.
On the standby Adaptive Server, put the standby database online.
On the Replication Server, resume connections to the active and standby databases, using the resume connection command.
Check the logical status, using the admin logical_status command. Do not continue unless both active and standby databases are marked “active.”
Verify that modifications occur from active to standby database.
Using isql, update a record in the active database and then verify the update in the standby database.