cdr check queue

Use the cdr check queue command to check the consistency of Enterprise Replication metadata, and to check the consistency of user data before running critical tasks in the Enterprise Replication domain. The command returns successfully when all of the commands that were queued when cdr check queue was run are complete.

Syntax


1  cdr check queue?  %Connect Option(1)  --qname=
2.1 cntrlq
2.1 sendq
2.1 recvq
1queue_name?  --wait =
2.1 -1
2.1! 0
2.1  time
2.1! M
2.1 H
2.1 S
1 +  target_server
1  --all
1   --grid  =  grid_name
Notes:
Element Purpose Restrictions Syntax
grid_name Name of the grid Must be the name of an existing grid. Long Identifiers
target_server Name of a database server group on which to check the queue

The following table describes the cdr check queue options.

Long Form Short Form Meaning
--all -a Specifies that all servers defined for the Enterprise Replication are checked
--grid -g Specifies the grid name
--qname -q Specifies the name of the queue to monitor:
  • cntrlq = Control queue
  • sendq = Send queue
  • recvq = Receive queue
--wait -w Specifies the amount of time to wait for queues to complete before returning.

Minutes are used if the time unit is not specified.

-1 = Wait until all queued elements are complete

0 (default) = Do not wait for queued elements to complete; return immediately

Positive integer = Number of hours, minutes, or seconds to wait, depending on the time unit specified:

  • H or h = Hours
  • M or m = Minutes (default)
  • S or s = Seconds

Usage

The cdr check queue command is used to monitor control, send, and receive queues on one or more Enterprise Replication servers and can optionally wait for queues to empty before returning.

The Enterprise Replication queues are checked at the time that the cdr check queue command runs. The time is displayed in the command output. For control and receive queues, any messages queued after the command runs are not included in the output. For the send queue, any transactions committed after the cdr check queue command runs are not included in the output.

If a leaf server name is specified with the --connect option, the system connects to the parent server to read information from the syscdr database.

Only a DBSA can run the cdr check queue command. With a non-root installation, the user who installs the server is the equivalent of the DBSA, unless the user delegates DBSA privileges to a different user.

Return codes

A return code of 0 indicates that the command was successful.

If the command is not successful, one of the following error codes is returned: 5, 17, 21, 48, 62, 94, 99, 100, 196, 222.

Example 1: Control queue report for all servers

The following command waits up to 10 seconds for the control queues on all replication servers to complete before generating a report.
cdr check queue -q cntrlq  -w 10s  -a
The queue report for the previous command might be:
Checking cntrlq queue status for server g_madras ...
cntrlq queue status for g_madras as of Mon Dec  5 12:03:19 2011:      COMPLETE
Checking cntrlq queue status for server g_delhi ...
cntrlq queue status for g_delhi as of Mon Dec  5 12:03:19 2011:       COMPLETE
Checking cntrlq queue status for server g_bombay ...
cntrlq queue status for g_bombay as of Mon Dec  5 12:03:19 2011:      COMPLETE
This report indicates that all of the queue items in the control queue at the time the cdr check queue command was issued are complete.

Example 2: Send queue report for all servers

The following command waits up to 10 seconds for the send queues on all replication servers to complete before generating a report.
cdr check queue -q  sendq  -w 10s  -a
The queue report for the previous command might be:
Checking sendq queue status for server g_madras ...
Checking sendq queue status for server g_delhi ...
sendq queue status for g_delhi as of Mon Dec  5 12:04:00 2011:       COMPLETE
sendq queue status for g_madras as of Mon Dec  5 12:04:00 2011:      COMPLETE
Checking sendq queue status for server g_bombay ...
sendq queue status for g_bombay as of Mon Dec  5 12:04:01 2011:      COMPLETE
This report indicates that all of the queue items in the send queue at the time the cdr check queue command was issued are complete.

Example 3: Send queue report that shows timeout

The following command waits up to 10 seconds for the send queues on all replication servers to complete before generating a report.
cdr check queue -q  sendq  -w 10s  -a
The queue report for the previous command might be:
Checking sendq queue status for server g_madras ...
sendq queue status for g_madras as of Mon Dec  5 12:04:54 2011:      COMPLETE
Checking sendq queue status for server g_delhi ...
sendq queue status for g_delhi as of Mon Dec  5 12:04:54 2011:     INCOMPLETE
  Operation timed out.
command failed -- Command timed out. (21)
This report indicates that the send queue for server g_delhi had commands that did not complete before the timeout period of 10 seconds elapsed.