Download IMDB Cache User's Guide
Transcript
Creating a cache group
Example 4–4 Stopping the replication agent
The replication agent can be manually stopped programmatically by calling the
ttRepStop built-in procedure as the cache manager user:
Command> call ttRepStop;
It can also be stopped from a command line by running a ttAdmin -repStop utility
command as a TimesTen external user with the CACHE_MANAGER privilege:
% ttAdmin -repStop cachealone1
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.
Example 4–5 Setting a replication agent start policy
As the instance administrator, grant the ADMIN privilege to the cache manager user:
% ttIsql cachealone1
Command> GRANT ADMIN TO cacheuser;
Command> exit
The replication agent start policy can be set programmatically by calling the
ttRepPolicySet built-in procedure as the cache manager user:
% ttIsql "DSN=cachealone1;UID=cacheuser;PWD=timesten;OraclePWD=oracle"
Command> call ttRepPolicySet('manual');
Command> exit
It can also be set from a command line by running a ttAdmin -repPolicy utility
command as a TimesTen external user with the ADMIN privilege:
% ttAdmin -repPolicy always cachealone1
Defining Cache Groups 4-11