Stop a Cache Agent (dbCacheStop)

The dbCacheStop command stops the cache agent.

ttGridAdmin dbCacheStop name [-instance hostname[.instancename]]
          [-nowait | -wait [timeout]]

Options

The dbCacheStop command has the options:

Option Description

name

The name of the database.

-instance hostname[.instancename]

If specified, cache agent(s) are stopped only on the specified instance(s), instead of on all instances of the grid.

If -instance is used, then the hostname is required. The instancename is required only if there is more than one instance on the host. (See Grid Objects and Object Naming.)

-nowait | -wait [timeout]

The command initiates a state change that is recorded in the active management instance of the grid.

The -nowait option causes the command to return immediately without waiting for the state change. This is the default behavior.

The -wait option causes the command to wait for the state change to complete, when the database element has been closed on each instance in the grid. You can optionally subject the wait to a limit of timeout seconds. Otherwise, or if timeout is set to 0, there is no limit.

In a large grid, it is not typical or generally advisable to use -wait. If you do, it is advisable to set a timeout. (See Database Management Operations.)

Examples

From the management instance, use the ttGridAdmin dbCacheStop command to stop cache agents on all data instances in the database1 database:

% ttGridAdmin dbCacheStop database1
Database database1 : Stopping cache agents. 

% ttGridadmin dbStatus database1 -element
Database database1 element level status as of Mon Dec  7 15:35:13 PST 2020
 
Host  Instance  Elem Status CA Status Date/Time of Event  Message 
----- --------- ---- ------ --------- ------------------- ------- 
host3 instance1    1 opened stopped   2020-12-07 15:35:13         
host4 instance1    2 opened stopped   2020-12-07 15:35:13         
host5 instance1    3 opened stopped   2020-12-07 15:35:13         
host6 instance1    4 opened stopped   2020-12-07 15:35:13         
host7 instance1    5 opened stopped   2020-12-07 15:35:13         
host8 instance1    6 opened stopped   2020-12-07 15:35:13

You can stop the cache agent for a specific data instance with the -instance option.

% ttGridAdmin dbCacheStop database1 -instance host4.instance1
Database database1 : Stopping cache agents. 

% ttGridadmin dbStatus database1 -element
Database database1 element level status as of Mon Dec  7 15:20:48 PST 2020
 
Host  Instance  Elem Status CA Status Date/Time of Event  Message 
----- --------- ---- ------ --------- ------------------- ------- 
host3 instance1    1 opened started   2020-11-23 08:37:35         
host4 instance1    2 opened stopped   2020-12-07 15:20:48         
host5 instance1    3 opened started   2020-11-23 08:37:35         
host6 instance1    4 opened started   2020-11-23 08:37:35         
host7 instance1    5 opened started   2020-11-23 08:37:35         
host8 instance1    6 opened started   2020-11-23 08:37:35 

Note:

If there is only one cache agent running, do not stop the last cache agent immediately after you have dropped or altered a cache group with autorefresh. Instead, wait for at least two minutes to enable the cache agent to clean up Oracle Database objects such as change log tables and triggers that were created and used to manage the cache group. This is not an issue when you have more than one cache agent running.