After setting up an active master database, you can create the standby database by cloning the active database to the standby server. In order to duplicate the active database, the instance administrator on the standby machine must be identical to the one on the active server.
This tutorial uses the pre-defined DSNs repdb1_1121 and repdb2_1121 shipped with TimesTen 11.2.1. The hostnames of the two machines are stacb12 and stach17. repdb1_1121 is the active database on stacb12, and repdb2_1121 on stach17 is the standby database.
7. Start the replication agent
a. Log in to server 2 (stach17) as the instance administrator. Use the ttRepAdmin utility to duplicate from the active database to the standby database. ttrepadmin -duplicate -from repdb1_1121 -host "stacb12" -uid adm -pwd adm "dsn=repdb2_1121" Note that the -from clause is using the data store name repdb1_1121 and not the DSN name; -uid and -pwd correspond to the username and password of the ADMIN user on the active database.
a. Using ttIsql, connect to the database repdb2_1121 as the replication administrator adm. ttisql "dsn=repdb2_1121;uid=adm" b. The replication agent on the standby is responsible for processing the data from the active database. Use the built-in procedure ttRepStart to start the replication agent. call ttrepstart; c. Wait for repdb2 to enter the standby state. Use the built-in procedure ttRepStateGet to verify the current replication state of the database. call ttrepstateget;
Once the standby database entered the 'standby' state, the configuration of an active standby pair is completed. Changes to data in the active database will be automatically replicated to the standby.
8. Verify the data is being replicated between the active and the standby
a. In ttIsql, connect to repdb1_1121 as appuser, and insert a record into the orders table. connect "dsn=repdb1_1121; uid=appuser";
insert into orders values (6853180,1121,'9999999999', sysdate);b. Verify that the insert is replicated to the standby database repdb2_1121. select * from appuser.orders where order_number=6853180;
< Previous 1 2 3
Home | Site Map | Contact Us | Copyright © 2011 |