Set Replication Policies

Options

ttAdmin has these options for replication:

Option Description

-connStr connection_string

An ODBC connection string that specifies a database location, driver, and optionally other connection attribute settings.

DSN

An ODBC data source name of the database to be administered.

-repPolicy

Defines the policy used to determine when the replication agent starts.

manual (default) - Specifies that the replication agent must be manually started and stopped.

always - Specifies that the agent should always be running for the database. This option immediately starts the replication agent. When the daemon restarts, the replication agent is restarted.

norestart - Specifies that the replication agent for the database is not to be restarted after a failure.

-repQueryThresholdGet

Returns the number of seconds that a query can be run by the replication agent before TimesTen writes a warning to the daemon log. A value of 0 indicates that no warning is sent.

-repQueryThresholdSet secs

This option specifies the number of seconds that a query can be run by the replication agent before TimesTen writes a warning to the daemon log.

The specified value takes effect the next time the replication agent starts. The query threshold for the replication agent applies to SQL execution on detail tables of materialized views, ON DELETE CASCADE operations and some internal operations.

The value must be greater than or equal to 0.

Default is 0 and indicates that no warning is sent.

-repStart

Starts the replication agent.

-repStop

Stops the replication agent.

Examples

These examples show use of replication options:

% ttAdmin -repPolicy always rep1
RAM Residence Policy            : inUse
Replication Agent Policy        : always
Cache Agent Policy              : manual
Cache Agent Manually Started    : False
Database State                  : Open
 
% ttAdmin -repPolicy manual rep1
RAM Residence Policy            : inUse
Replication Agent Policy        : manual
Replication Manually Started    : True
Cache Agent Policy              : manual
Cache Agent Manually Started    : False
Database State                  : Open
 
% ttAdmin -repPolicy norestart rep1
RAM Residence Policy            : inUse
Replication Agent Policy        : norestart
Replication Manually Started    : True
Cache Agent Policy              : manual
Cache Agent Manually Started    : False
Database State                  : Open
 
% ttAdmin -repQueryThresholdSet 100 rep1
RAM Residence Policy            : inUse
Replication Agent Policy        : norestart
Replication Manually Started    : True
Cache Agent Policy              : manual
Cache Agent Manually Started    : False
Database State                  : Open
 
% ttAdmin -repQueryThresholdGet rep1
QueryThreshold in seconds : 100
RAM Residence Policy            : inUse
Replication Agent Policy        : norestart
Replication Manually Started    : True
Cache Agent Policy              : manual
Cache Agent Manually Started    : False
Database State                  : Open

Notes

If ttAdmin is used with -repStart and a replication definition is not found, the replication agent is not started and ttAdmin prints out an error message. For example:

% ttAdmin -repstart repl1
*** [TimesTen][TimesTen 22.1.1.21 ODBC Driver][TimesTen]TT8191: 
This store (repl1 on my_host) is not involved in a replication scheme -- 
file "eeProc.c", lineno 11016, procedure "RepAdmin()"
*** ODBC Error = S1000, TimesTen Error = 8191

If ttAdmin is used with -repPolicy manual (the default) or -repPolicy always, then the -ramPolicy always option should also be used. This ensures that the replication agent begins recovery after a failure as quickly as possible.