Oracle9i Data Guard Broker Release 1 (9.0.1) Part Number A88807-01 |
|
Chapter 2 introduced the database resource states and properties. This chapter describes using the database resource object in the following sections:
A database resource object is at the lowest level in the hierarchy of objects managed by the broker. It is a named object that corresponds to a primary or standby database instance. Each DMON process uses this object to manage and monitor the state of a single database.
To predictably and consistently manage database resources, the DMON process uses a resource guard, that is preconfigured to monitor the database and manage its state and property transitions. When you use Data Guard Manager or the Data Guard command-line interface (CLI) to make a state change or property change, the request is passed through the DMON process to its built-in resource guard that then services the requests according to a predefined set of functions. It is the resource guard that ensures the correct and consistent functioning of the database resource.
The state of a database resource is dependent upon the state of the site on which the resource resides, and the state of the site is dependent upon that of the configuration. Thus, a site is the parent for a database resource and the configuration is the parent for a site.
This is important because when a parent is offline, its dependents must also be offline. For example, if a site is in an offline state, the database that is dependent on the site must also be in an offline state. Similarly, if the configuration is offline, all of the sites and resources in the configuration are also offline because all are logically dependent on the configuration object.
When enabled, a database resource object can be in an online or an offline state.
READ-WRITE-XPTON
substate in the CLI and it is referred to as the online selection for the primary database in Data Guard Manager.
PHYSICAL-APPLY-ON
substate in the CLI and it is referred to as the online selection for the standby database in Data Guard Manager.
See Table 3-1 for all of the online substates for the primary and standby database resources.
Section 2.5 provided some background information about configuration, site, and database states and substates. This section provides more detail about the database substate, which is related to the role (primary or standby) in which the site is currently running.
When a database is in an online state, the database state is further qualified to be in one of several substates. For example, when a primary database is in an online state, it might be started and open in read/write mode, or it might be started and mounted in read/write mode with the log transport services archiving redo logs to the standby site.
Table 3-1 describes all of the primary and standby database resource substates. The first two columns of the table show the substate name if you are using Data Guard Manager and the corresponding name if you are using the CLI.
Table 3-2 summarizes all of the possible variations of the database online substates and the implication of each one on the primary and standby databases, and on log transport services and log apply services.
Figure 3-1 graphically shows the database states that were described in Table 3-1, and indicates that you can transition from one state to any other state.
Figure 3-1 shows that the primary and standby databases can be in an offline state or, when online, can be in one of several substates:
When a standby database is taken offline, it is not shut down and restarted as is done for the primary database.
With the CLI, you can use the ALTER RESOURCE
command to explicitly change the state of a database resource. For example, the ALTER RESOURCE
command in the following example changes the state of the Sales_db resource to read/write.
DGMGRL> ALTER RESOURCE 'Sales_db' ON SITE 'Boston' SET STATE='read-write'; Succeeded.
See Chapter 6 for complete information about the ALTER RESOURCE
command. See also Chapter 4 for information about performing state transitions using Data Guard Manager.
There are two types of properties--configurable and monitorable:
Configurable properties affect the operation or configuration of the resource objects. You can change the value of these properties using the CLI or Data Guard Manager.
Table 3-3 describes the database resource configurable properties.
Name | Value | Type | Critical or Noncritical | Set On | Description |
---|---|---|---|---|---|
ArchiveDestDependency |
|||||
|
Site name |
String |
Critical |
Standby |
Specifies the
For example, consider one primary site (Boston) and one standby site (San Jose). San Jose depends on Boston for its archived redo logs. Then, you update the property |
ArchiveLagTarget |
|||||
|
Seconds |
Integer |
Noncritical |
Primary |
Updates the |
LogArchiveDestOptions |
|||||
|
Attributes for the |
String |
Critical |
Standby |
Specifies the You can set this critical property to null. |
LogArchiveTrace |
|||||
|
Any valid integer value Foot 1 |
Integer |
Noncritical |
Primary and standby |
Updates the |
FalServer |
|||||
|
Oracle Net service name |
String |
Noncritical |
Standby |
Updates the
Note: If you never change the |
FalClient |
|||||
|
Oracle Net service name |
String |
Noncritical |
Standby |
Updates the
Note: If you never change the |
StandbyArchiveDest |
|||||
|
File specification |
String |
Critical |
Standby |
Updates the file specification for the You can set this critical property to null. |
StandbyFileManagement |
|||||
|
|
String |
Noncritical |
Standby |
Updates the |
1
See the Oracle9i Database Reference for a list of valid values to the LOG_ARCHIVE_TRACE initialization parameter. |
Note the following about the configurable properties in Table 3-3:
Noncritical database properties do not need to be set for log transport services and log apply services to function properly. If a noncritical property is not set, then the Data Guard monitor uses the value that is in the parameter file.
Critical database properties must be set for log transport services and log apply services to function properly. Only standby resources require that you set the critical database properties. If critical properties are not set for a standby database resource, then log transport services on the primary site will not be enabled and the health check for the configuration will fail and return an error status to the Data Guard monitor.
The LogArchiveDestOptions
, ArchiveDestDependency
, and StandbyArchiveDest
critical database properties map directly to the following database initialization parameters: LOG_ARCHIVE_DEST_
n
, the DEPENDENCY
attribute of LOG_ARCHIVE_DEST_
n
, and STANDBY_ARCHIVE_DEST
, respectively.
Depending on how you create the broker configuration, the critical database properties may be set automatically or manually, as follows:
LogArchiveDestOptions
, ArchiveDestDependency
, and StandbyArchiveDest
properties to the following default values:
reportingdb
standby database resource:
DGMGRL> ALTER RESOURCE reportingdb SET PROPERTYLogArchiveDestOptions
= ''; DGMGRL> ALTER RESOURCE reportingdb SET PROPERTYArchiveDestDependency
= ''; DGMGRL> ALTER RESOURCE reportingdb SET PROPERTYStandbyArchiveDest
= '/archfs/arch/';
You do not need to set critical properties for the primary database resource.
Monitorable properties allow you to view information related to resources, but you cannot change the value of these properties.
The following sections describe the database resource monitorable properties:
The SendQEntries property returns a table that shows all of the log files on the primary site that have not yet been successfully shipped to one or more standby sites. The table contains the following columns:
SITE_NAME
The value can be empty or it can contain the name of the site. If empty, the STATUS
column will contain a value of CURRENT
or NOT_ARCHIVED
.
STATUS
The STATUS
column is set to one of the following values:
CURRENT
--A log file to which online redo logs are being written currently.
NOT_ARCHIVED
--A completed log file that has been archived locally, but has not been shipped to the standby sites.
ARCHIVED
--A completed log file that has been archived locally and shipped to the standby sites.
The table contains exactly one row with the value of STATUS=CURRENT
. There can be multiple rows with the value STATUS=ARCHIVED
or STATUS=NOT_ARCHIVED
.
LOG_SEQ
The log sequence number. Multiple rows may have the same LOG_SEQ
value (for different SITE_NAME
values).
TIME_GENERATED
The time when the log was generated.
TIME_COMPLETED
The time when the log was completed.
For example, the following shows output from a SHOW RESOURCE VERBOSE
command:
DGMGRL> SHOW RESOURCE VERBOSE 'db' 'SendQEntries'; PRIMARY_SEND_QUEUE SITE_NAME STATUS LOG_SEQ TIME_GENERATED TIME_COMPLETED Standby ARCHIVED 9 11/21/2000 10:57:49 11/21/2000 10:59:42 Standby ARCHIVED 10 11/21/2000 10:59:42 11/21/2000 10:59:43 Standby ARCHIVED 11 11/21/2000 10:59:43 11/21/2000 10:59:49 Standby ARCHIVED 12 11/21/2000 10:59:49 11/21/2000 10:59:54 CURRENT 13 11/21/2000 10:59:54
The LogXptStatus property contains the error status of log transport services for each of the currently enabled standby sites, unless the following conditions are true:
LOG_ARCHIVE_DEST_
n
parameter includes the OPTIONAL
attribute.
The format of the error status is as follows:
"standby1_sitename
=error_status,standby2_sitename
=error_status,..."
The error status can be an empty string.
In the following example, the string for Standby1 is empty because there is no error for the Standby1 destination. The standby2 destination returned the ORA-01034 message:
DGMGRL> SHOW RESOURCE VERBOSE 'Sales_db' 'LogXptStatus';
LogXptStatus = 'Standby1=',standby2=ORA-01034: ORACLE not available"
The SbyLogQueue property returns a table that indicates all of the logs that were received by the standby site, but have not yet been applied. The table contains the following columns:
LOG_SEQ
The log sequence number.
TIME_GENERATED
The time when the log was generated.
TIME_COMPLETED
The time when the log was completed.
For example:
DGMGRL> SHOW RESOURCE VERBOSE 'reportingdb' 'SbyLogQueue'; STANDBY_RECEIVE_QUEUE LOG_SEQ TIME_GENERATED TIME_COMPLETED 6 11/21/2000 10:57:16 11/21/2000 10:57:41 7 11/21/2000 10:57:41 11/21/2000 10:57:43 8 11/21/2000 10:57:43 11/21/2000 10:57:49
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|