Home | Previous Page | Next Page   Appendix C. onstat Command Reference > onstat -g Command Summary >

onstat -g ddr

The onstat -g ddr command prints the status of the Enterprise Replication database log reader. The ddr, or ddr_snoopy, is an internal component of Enterprise Replication that reads the log buffers and passes information to the grouper.

You can use the information from the onstat -g ddr command to monitor replay position in the log file and ensure replay position is never overwritten (which can cause loss of data). The replay position is the point from where, if a system failure occurs, Enterprise Replication starts re-reading the log information into the log update buffers. All the transactions generated before this position at all the target servers have been applied by Enterprise Replication or safely stored in stable queue space.

The onstat -g ddr output shows you a snapshot of the replay position, the snoopy position, and the current position. The snoopy position identifies the position of the ddr_snoopy thread in the logical logs. The ddr_snoopy has read the log records up until this point. The current position is the position where the server has written its last logical log record.

The log needs position is based on replay position and is set at a certain distance from replay position, for example, at seventy percent of the log file. The remainder of the circular log file comprises the DDR BLOCK zone. As messages are acknowledged or stored in the stable queue, the replay position, and hence also the log needs position, should advance. If you notice that replay position is not advancing, this can mean that the stable queue is full or a remote server is down.

If log reading is blocked, data might not be replicated until the problem is resolved. If the block is not resolved, the database server might overwrite the read (ddr_snoopy) position, which means that data will not be replicated. If this occurs, you must manually resynchronize the source and target databases.

If you are running servers prior to Version 9.3, to avoid these problems, IBM recommends that you:

For servers of Version 9.4, and later, you can enable dynamic log creation by setting the CDR_MAX_DYNAMIC_LOGS configuration parameter in the ONCONFIG file. If the current position reaches the log needs position, instead of going into a blocked state, Enterprise Replication automatically adds another log file. If this option is set, the onstat -g ddr command prints the number of dynamic log requests made.

The following sample output from the onstat ddr command shows the replay position, snoopy position, and current position highlighted.

DDR -- Running 
# Event  Snoopy   Snoopy    Replay   Replay    Current  Current
Buffers  ID       Position  ID       Position  ID       Position
528      24       165018    24       6a018     24       166000
Log Pages Snooped:      From      From      Tossed
                        Cache     Disk      (LBC full)
                        247       111        0
Total dynamic log requests: 0
DDR events queue
Type   TX id    Partnum  Row id
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]