Oracle® Data Guard Broker 11g Release 1 (11.1) Part Number B28295-01 |
|
|
View PDF |
This chapter describes various errors and how to solve them. It contains the following topics:
The Data Guard broker provides information about its activities in several forms:
Database status information (see Section 4.9)
Oracle alert log files
The broker records key information in the alert log file for each database. You can check the alert log files for such information when troubleshooting Data Guard.
For each database in a broker configuration, the broker DMON process records important behavior and status information in a "broker log file," useful in diagnosing Data Guard failures.
The broker log file is created in the same directory as the alert log and is named drc<$ORACLE_SID>.log
.
This section describes general problems and solutions. This section contains the following topics:
ORA-16596: Object Not Part of the Data Guard Broker Configuration
Redo Accumulating on the Primary Is Not Sent to Some Standby Databases
Many Log Files Are Received on a Standby Database But Not Applied
A request was issued to the broker, but the database instance through which you have connected is no longer a part of the broker configuration. You may see this error when the broker fails to locate a broker configuration profile for the database upon which it is running.
Solution Reconnect to the configuration through another database that you know is part of the broker configuration. Confirm that a database exists in the broker configuration that has a name that matches the db_unique_name
value of the database that returned the ORA-16596 error.
This problem can also occur if you attempt to enable a configuration, but the broker configuration file for one of its databases was accidentally removed or is outdated. In this case, remove the database from the broker configuration, manually delete the configuration file for that standby database (not for the primary database), and try again to enable the configuration. After the configuration is enabled, to create a new database profile for the previously deleted standby database, you can either use the Enterprise Manager Add Standby Database wizard and choose the Add existing standby database option, or you can use the DGMGRL command-line interface and issue the ADD DATABASE
command.
By viewing the Log File Details page in Enterprise Manager, you have determined that log files are accumulating on the primary database and are not being archived to some of the standby databases in the broker configuration.
Solution To narrow down the problem, do the following:
Verify that the state of the primary database is in the TRANSPORT-ON
state (not TRANSPORT-OFF
).
Verify that the value of the LogShipping
configurable database property of the standby database in question is ON
.
Check the status of the redo transport services on the primary database using the LogXptStatus
monitorable database property. If redo transport services have an error, then use the error message to determine further checking and resolution action. For example:
If the error indicates the standby database is not available, you need to restart the standby database.
If the error indicates no listener, you need to restart the listener.
If the error indicates the standby database has no local destination, you need to set up a standby location to store archived redo log files from the primary database.
By viewing the Performance page or Log File Details page in Enterprise Manager, you have determined that the standby database accumulates too many log files without applying them.
Solution There are many possible reasons why archived redo log files might not be applied to the standby database. Investigate why the log files are building up and rule out the valid reasons.
If the current status of the standby database is not normal:
Determine whether or not the log apply services might be unexpectedly stopped. See the ORA-16766 (for physical standby databases) or ORA-16768 (for logical standby databases) error description and solution statement for more help.
If this is a logical standby database, check to see if a failed transaction has occurred.
If you want to suppress the error while you investigate the problem, you can temporarily disable broker management of the database.
See Also:
Chapter 8 for additional information about disabling the database using the DGMGRL command-line interfaceIf the current status of the standby database is normal:
Verify the state of the standby database is APPLY-ON
(not in the APPLY-OFF
state).
Verify the state of the primary database is TRANSPORT-ON
(not in the TRANSPORT-OFF
state).
Check to see if log files are building up because the value of the DelayMins
property is set too large. (Log apply services will delay applying the archived redo log files on the standby database for the number of minutes specified.)
If you cannot see any errors, compare the archive rate to the apply rate on the Performance page in Enterprise Manager to see if the apply rate is lower than the archive rate.
If the broker requests are not completing within the normal timeout parameters, try the following actions to solve the problem:
Verify the network is operating appropriately.
Try to ping all of the nodes in the configuration.
Try reconnecting through another database to retry the operation.
Run the VERIFY
command from the configuration to see which broker is busy. The output from the VERIFY
command should show why, or at least on which database, the broker is not able to process the requests.
If the primary database is flashed back, the standby databases in the configuration must be also be flashed back or reenabled to be viable targets for switchovers or failovers. The broker will report errors for the standby databases if the primary database has been flashed back.
For more information about restoring the viability of a standby database that was disabled by the broker, see Section 5.4.3.
If the switchover fails due to problems with the configuration, the broker reports any problems it encounters in the alert log files or in the broker log files (see Section 10.1). In general, you can choose another database for the switchover or restore the configuration to its pre-switchover state and then retry the switchover. The following subsections describe how to recover from the most common problems.
Problems Transitioning the Primary Database to the Standby Role
If the error status indicates a problem when transitioning the original primary database to the standby role (including stopping redo transport services and starting log apply services), use these general guidelines to recover:
Disable the configuration using DGMGRL.
Note:
You can enable or disable the configuration using DGMGRL. You cannot disable the configuration using Enterprise Manager. You can enable the configuration using Enterprise Manager if it was previously disabled using DGMGRL.Investigate the error message returned by the broker to find the source of the problem on the primary database and correct it. Oracle Enterprise Manager provides an Alert Log Content link for viewing alert log file information. You may also examine the contents of the broker log file for the primary database.
Reenable the configuration to refresh and restore the databases to their original roles and states.
Perform the switchover again.
Problems Transitioning the Standby Database to the Primary Role
If the error status indicates that a problem occurred when transitioning the target standby database to the primary role (including stopping log apply services and starting redo transport services), use these general guidelines to restore to the pre-switchover state.
If fast-start failover is enabled, the broker does not allow switchover to any standby database except to the target standby database. In addition, switchover to the target standby database is allowed only when the value of the FS_FAILOVER_STATUS
column in the V$DATABASE
view on the target standby database is either READY
or SUSPENDED
.
Failed Switchovers to Physical Standbys
Take the following steps to recover from a failed switchover to a physical standby.
Step 1 Analyze and correct the detected failure.
If fast-start failover is enabled, disable it.
Disable the configuration using DGMGRL.
Note:
You can enable or disable the configuration using DGMGRL. You cannot disable the configuration using the Enterprise Manager. You can enable the configuration using Enterprise Manager if it was previously disabled using DGMGRL.Investigate the error messages returned by the broker to find the source of the problem on the standby database and correct it. Examine the alert log file information and the contents of the broker log file for the target standby database.
Step 2 Convert back to a primary database.
The original primary database was already converted to a physical standby database by the time this stage of the switchover is reached. The database must be converted back to being a primary database.
Step 3 Finish the recovery.
Reenable the configuration.
Perform the switchover operation again.
Failed Switchovers to Logical Standbys
Take the following steps to recover from a failed switchover to a logical standby.
Step 1 Analyze and correct the detected failure.
If fast-start failover is enabled, disable it.
Remove the configuration.
Step 2 Convert back to the primary database.
The original primary database was already converted to a logical standby database by the time this stage of the switchover is reached. The database must be converted back to being a primary database.
Step 3 Finish the recovery.
Re-create the configuration.
Reenable the configuration.
Perform the switchover operation again.
Additional Problems that May Occur During a Switchover Operation
Problem: The switchover fails due to problems with redo transport services.
Solution:
Verify the state and status of the standby database by viewing its information on the Data Guard Overview page.
See Also:
Chapter 6 for additional information about the Data Guard Overview pageRun the Verify operation after the switchover completes to examine the alert log file of the new primary database and to verify the status of the configuration.
See Also:
Section 6.8.1 for additional information about verifying the configurationProblem: The switchover may fail during verification checks done by Data Guard broker (for example, redo transport services might return errors on a database that is involved in the switchover).
Solution: Choose another database for the switchover or fix the problem by transporting the archived redo log files.
Although it is possible for a failover to stop, it is unlikely. If an error occurs, it is likely to happen when the standby database is transitioning to the primary role. If the error status indicates that this problem occurred, use these general guidelines to fix the problem:
Investigate the error information provided by the broker to find the source of the problem and correct it.
If the standby that you chose as a failover target cannot be failed over to, choose a another standby database.
The following problems may occur during a failover operation:
Problem: The primary database is still running. Enterprise Manager tries to detect if the primary database is still running. However, if the primary database is still running and the Enterprise Manager cannot detect that it is running, the failover will not be successful.
Solution: If the primary database is still running but can no longer function as a primary database, shut it down and retry the failover.
The observer continuously monitors the fast-start failover environment to ensure the primary database is available. Installing and starting the observer is an integral part of using fast-start failover. The following sections describe techniques for troubleshooting the observer:
Only one observer can be observing the broker configuration at any given time. If you attempt to start a second observer, one of the following errors is returned:
ORA-16647: could not start more than one observer DGM-16954: Unable to open and lock the Observer configuration file
Use the DGMGRL SHOW CONFIGURATION VERBOSE
command to determine the location of the observer that is currently associated with the broker configuration.
DGMGRL> SHOW CONFIGURATION VERBOSE;
Configuration
Name: DRSolution
Enabled: YES
Protection Mode: MaxAvailability
Databases:
North_Sales - Primary database
DR_Sales - Physical standby database
- Fast-Start Failover target
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: DR_Sales
Observer: o_host
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Current status for "DRSolution":
SUCCESS
If the observer host machine crashes, the broker configuration is no longer observed and fast-start failover is no longer possible. In this case, you may have to move the observer to a new host if the original host machine cannot be repaired in a timely fashion. To move the observer, you must stop allowing the first observer to observe this broker configuration, and then start a new observer on another host.
Issue the DGMGRL STOP OBSERVER
command to sever the link between the original observer and the broker configuration:
DGMGRL> STOP OBSERVER; Done.
Issue the DGMGRL SHOW CONFIGURATION VERBOSE
and the SHOW DATABASE
commands to verify that the configuration is no longer being observed:
DGMGRL> SHOW CONFIGURATION VERBOSE;
Configuration
Name: DRSolution
Enabled: YES
Protection Mode: MaxAvailability
Databases:
North_Sales - Primary database
DR_Sales - Physical standby database
- Fast-Start Failover target
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: DR_Sales
Observer: (none)
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Current status for "DRSolution":
Warning: ORA-16608: one or more databases have warnings
DGMGRL> SHOW DATABASE 'North_Sales';
Database
Name: North_Sales
Role: PRIMARY
Enabled: YES
Intended State: TRANSPORT-ON
Instance(s):
sales1
Current status for "DR_Sales"
Error: ORA-16658: unobserved fast-start failover configuration
Note that you do not need to issue the DGMGRL SHOW
commands to verify that the observer has actually stopped. Successful completion of the DGMGRL STOP OBSERVER
command will allow a new observer to become associated with the configuration.
You can use the DGMGRL -logfile
option to start the observer, so that all of the troubleshooting actions performed in Section 10.5.1 can be captured in a file. For example:
% dgmgrl -logfile observer.log / "start observer"
All the observer output is then recorded in a file named observer.log
in the current working directory where you issued the DGMGRL command.
Note that this is not only useful for troubleshooting problems with the observer, but also for troubleshooting problems with fast-start failover in general.