Setting a Replication Agent Start Policy

Performing asynchronous writethrough operations requires that the replication agent be running on the TimesTen database that contains AWT cache groups. You can set a replication agent start policy to determine how and when the replication agent process starts on a TimesTen database.

The default start policy is manual which means the replication agent must be started manually by calling the ttRepStart built-in procedure or running a ttAdmin -repStart utility command. To manually stop a running replication agent process, call the ttRepStop built-in procedure or run a ttAdmin -repStop utility command.

The start policy can be set to always so that the replication agent starts automatically when the TimesTen main daemon process starts. With the always start policy, the replication agent cannot be stopped when the main daemon is running unless the start policy is changed to either manual or norestart and then a manual stop is issued by calling the ttRepStop built-in procedure or running a ttAdmin -repStop utility command.

With the manual and always start policies, the replication agent automatically restarts after a failure such as a database invalidation.

The start policy can be set to norestart which means the replication agent must be started manually by calling the ttRepStart built-in procedure or running a ttAdmin -repStart utility command, and stopped manually by calling the ttRepStop built-in procedure or running a ttAdmin -repStop utility command.

With the norestart start policy, the replication agent does not automatically restart after a failure such as a database invalidation. You must restart the replication agent manually by calling the ttRepStart built-in procedure or running a ttAdmin -repStart utility command.

Perform the following to set the replication agent start policy:

  1. Before you set a replication agent start policy, grant the ADMIN privilege to the TimesTen cache administration user as the instance administrator.

    % ttIsql cache1
    Command> GRANT ADMIN TO cacheadmin;
    Command> exit
  2. Set the replication agent start policy by calling the ttRepPolicySet built-in procedure as the TimesTen cache administration user:

    % ttIsql "DSN=cache1;UID=cacheadmin;PwdWallet=/wallets/cacheadminwallet"
    Command> call ttRepPolicySet('manual');
    Command> exit

    Alternately, set the replication agent start policy from a command line by running a ttAdmin -repPolicy utility command as a TimesTen external user with the ADMIN privilege:

    % ttAdmin -repPolicy always cache1