Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Data Service for Oracle TimesTen Guide Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

## Example: Defining TimesTen Replication in an Active-Active Configuration

This procedure defines the TimesTen replication.

1. Define the replicated data stores.

   On both nodes, add the following lines to the `/timesten/TimesTen/info/sys.odbc.ini` file.

       [active]
       DataStore=/timesten/data/active
       PermSize=64
       DatabaseCharacterSet=WE8MSWIN1252

2. Define the datastore content, including a user with administrative permissions.

       phys-schost-1$ ttIsql active
       Command> create table
       t1 (col1 integer not null, col2 varchar(30), primary key (col1));
       Command> CREATE REPLICATION repscheme1
              > ELEMENT complete DATASTORE
              > MASTER active on "phys-schost-2"
              > subscriber active on "phys-schost-1";
       Command> CREATE REPLICATION repscheme2
              > ELEMENT complete DATASTORE
              > MASTER active on "phys-schost-1"
              > subscriber active on "phys-schost-2";
       Command> CALL ttRepStart;
       Command> create user repl identified by 'repl';
       Command> grant admin to repl;

3. Duplicate the data store `active` to the remote node and start the replication agent.

       phys-schost-2$ ttRepAdmin -duplicate -from active \
       > -host phys-schost-1 -uid repl -pwd repl "dsn=active"
       phys-schost-2$ ttIsql -e "call ttrepstart;exit;" active

4. Define the replication policy on all hosts.

       phys-schost-1$ ttAdmin -repPolicy always active
       phys-schost-2$ ttAdmin -repPolicy always active

Copyright © 2010, 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices |