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_1122 and repdb2_1122 shipped with TimesTen 11.2.2. The hostnames of the two machines are tthost1 and tthost2. repdb1_1122 is the active database on tthost1, and repdb2_1122 on tthost2 is the standby database.6. Duplicate the active database to the standby
7. Start the replication agent
Log in to server 2 (tthost2) as the instance administrator. Use theutility to duplicate from the active database to the standby database.
ttrepadmin -duplicate -from repdb1_1122 -host "tthost1" -uid adm -pwd adm "dsn=repdb2_1122"
Note: The -from clause is using the data store name <repdb1_1122 and not the DSN name; -uid and -pwd correspond to the username and password of the ADMIN user on the active database.
8. Verify the data is being replicated between the active and the standby
Using ttIsql, connect to the database repdb2_1122 as the replication administrator adm.
The replication agent on the standby is responsible for processing the data from the active database. Use the built-in procedureto start the replication agent.
Wait for repdb2_1122 to enter the standby state. Use the built-in procedureto verify the current replication state of the database.
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.
In ttIsql on tthost1, connect to repdb1_1122 as appuser, and insert a record into the orders table.
connect "dsn=repdb1_1122; uid=appuser";
insert into orders values (6853180,1121,'9999999999', sysdate);
Verify that the insert is replicated to the standby database repdb2_1122 on tthost2.
select * from appuser.orders where order_number=6853180;
For more information about how to set up and manage an Active Standby Pair on a TimesTen database refer to the documentation here