Troubleshooting Oracle replicas - Amazon Relational Database Service

Troubleshooting Oracle replicas

This section describes possible replication problems and solutions.

Monitoring Oracle replication lag

To monitor replication lag in Amazon CloudWatch, view the Amazon RDS ReplicaLag metric. For more information about replication lag time, see Monitoring read replication and Amazon CloudWatch metrics for Amazon RDS.

For a read replica, if the lag time is too long, query the following views:

  • V$ARCHIVED_LOG – Shows which commits have been applied to the read replica.

  • V$DATAGUARD_STATS – Shows a detailed breakdown of the components that make up the ReplicaLag metric.

  • V$DATAGUARD_STATUS – Shows the log output from Oracle's internal replication processes.

For a mounted replica, if the lag time is too long, you can't query the V$ views. Instead, do the following:

  • Check the ReplicaLag metric in CloudWatch.

  • Check the alert log file for the replica in the console. Look for errors in the recovery messages. The messages include the log sequence number, which you can compare to the primary sequence number. For more information, see Oracle database log files.

Troubleshooting Oracle replication failure after adding or modifying triggers

If you add or modify any triggers, and if replication fails afterward, the problem may be the triggers. Ensure that the trigger excludes the following user accounts, which are required by RDS for replication:

  • User accounts with administrator privileges

  • SYS

  • SYSTEM

  • RDS_DATAGUARD

  • rdsdb

For more information, see Miscellaneous requirements and restrictions for Oracle replicas.