Oracle Dataguard Test

Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise data. Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruptions. Data Guard maintains these standby databases as transactionally consistent copies of the production database. Then, if the production database becomes unavailable because of a planned or an unplanned outage, Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage. Data Guard can be used with traditional backup, restoration, and cluster techniques to provide a high level of data protection and data availability.

With Data Guard, administrators can optionally improve production database performance by offloading resource-intensive backup and reporting operations to standby systems. For this to happen, it is necessary to keep vigil on whether the Data Guard feature is enabled on the Oracle database server round the clock. The Oracle Dataguard test helps administrators in this regard!

This test helps administrators determine whether the oracle Data Guard feature is enabled, and if enabled helps figure out the current role of the database server. The test also reveals whether any standby database has switched into production role recently.

Target of the test : An Oracle server on which Data Guard feature is enabled

Agent deploying the test : An internal/external agent

Outputs of the test : One set of results for every Oracle Database server being monitored.

Configurable parameters for the test
  1. TEST PERIOD - How often should the test be executed
  2. Host – The host for which the test is to be configured
  3. Port - The port on which the server is listening
  4. User – In order to monitor an Oracle database server, a special database user account has to be created in every Oracle database instance that requires monitoring. A Click here hyperlink is available in the test configuration page, using which a new oracle database user can be created. Alternatively, you can manually create the special database user. When doing so, ensure that this user is vested with the select_catalog_role and create session privileges.

    The sample script we recommend for user creation (in Oracle database server versions before 12c) for eG monitoring is:

    create user oraeg identified by oraeg

    create role oratest;

    grant create session to oratest;

    grant select_catalog_role to oratest;

    grant oratest to oraeg;

    The sample script we recommend for user creation (in Oracle database server 12c) for eG monitoring is:

    alter session set container=<Oracle_service_name>;

    create user <user_name>identified by <user_password> container=current default tablespace <name_of_default_tablespace> temporary tablespace <name_of_temporary_tablespace>;

    Grant create session to <user_name>;                                

    Grant select_catalog_role to <user_name>;

    The name of this user has to be specified here.

  5. Password – Password of the specified database user

    This login information is required to query Oracle’s internal dynamic views, so as to fetch the current status / health of the various database components.

  6. Confirm password – Confirm the password by retyping it here.
  7. ISPASSIVE – If the value chosen is yes, then the Oracle server under consideration is a passive server in an Oracle cluster. No alerts will be generated if the server is not running. Measures will be reported as “Not applicable" by the agent if the server is not up.
  8. includepath - This test reports a set of results for each datafile on the target Oracle database server. This means that every datafile is a descriptor of this test. By default, while displaying the descriptors of this test, the eG monitoring console does not prefix the datafile names with the full path to the datafiles. This is why, the INCLUDE PATH flag is set to No by default. If you want the data file names to be prefixed by the full path to the data files, then, set the INCLUDE PATH flag to Yes.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Is DG enabled?

Indicates whether/not the Data Guard feature is enabled.

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Yes 1
No 0

Note:

By default, this measure reports whether/not the Data Guard feature is enabled. The graph of this measure however, is represented using the numeric equivalents only - 0 or 1.

DB mode

Indicates the current role of the database.

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Primary 0
Physical standby 1
Logical standby 2
Snapshot standby 3

Note:

By default, this measure reports the current role of the database. The graph of this measure however, is represented using the numeric equivalents only - 0 to 3.

DB open mode

Indicates the open mode status of the database.

 

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Mounted 0
Read write 1
Read only 2
Read only with apply 3

Note:

By default, this measure reports the open mode status of the database. The graph of this measure however, is represented using the numeric equivalents only - 0 to 3.

Is switched

Indicates whether/not the role of the database has switched i.e., whether a production database has switched over to standby database and vice versa.

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Yes 1
No 0

Note:

By default, this measure reports whether/not the role of the database has switched. The graph of this measure however, is represented using the numeric equivalents only - 0 or 1.