Reporting and Monitoring

1.  Introduction

This section will cover the reporting and monitoring options available in Dbvisit Standby version 8.


On this page:


2.  The log gap report overview


To ensure the primary and standby databases are up to date, you can run the Log Gap Report using the following command from the primary database server:

./dbvctl -d <DDC> -i


Important:  In the example below the line numbers indicated below on the left with "1. -->", "2. -->" etc,  is used only for documentation purpose to help explain the report and is not included in the actual report


[oracle@dbv1 /usr/dbvisit/standby]$ ./dbvctl -d DEV -i
=============================================================
Dbvisit Standby Database Technology (8.0.08.18467) (pid 828)
dbvctl started on dbv1: Tue Jan 10 22:07:17 2017
=============================================================

Dbvisit Standby log gap report for DEV thread 1 at 201701102207:
-------------------------------------------------------------

1.-->  Destination database on dbv2 is at sequence: 10.
2.-->  Source database on dbv1 is at log sequence: 14.
3.-->  Source database on dbv1 is at archived log sequence: 13.
4.-->  Dbvisit Standby last transfer log sequence: 11.
5.-->  Dbvisit Standby last transfer at: 2017-01-10 22:06:34.

6.-->  Archive log gap for DEV:  3.
7.-->  Transfer log gap for DEV: 2.
8.-->  Standby database time lag (DAYS-HH:MI:SS): +1:06:24.

=============================================================
dbvctl ended on dbv1: Tue Jan 10 22:07:19 2017
=============================================================


The report line numbers are explained in more detail below:

  • Line 1 – Destination database on dbv2 is at log sequence: 10.

Shows the last log sequence (10) that was applied to the standby database.

  • Line 2 – Source database on dbv1 is at log sequence: 14.

Shows the current log sequence on the primary (14).  This is the log sequence that is current - not yet archived.

  • Line 3 – Source database on dbv1 is at archived log sequence: 13.

Shows the latest archive log sequence (13) available on the primary database.

  • Line 4 – Dbvisit Standby last transfer log sequence: 11.

Shows the last archive log sequence (11) that was transferred to the standby server.

  • Line 5 – Dbvisit Standby last transfer at 2017-01-10 22:06:34.

The timestamp (YYYYMMDDHH24MI) of the last transfer.

  • Line 6 – Archive log gap for DEV:  3.

This is one the most important lines to look at. It shows the Archive Log Gap, which means how many archive logs still need to be applied to the standby database. In this example, the value is 3. This indicates that my standby database is 3 logs behind the primary. If this value is 0 it means all available Archive logs from the primary have been applied to the standby, and it is up to date. Before doing a Graceful Switchover operation it is important to make sure this value is 0, with the exception when RAC is used, then one of the instances may have a value of 1. To reduce this value, run Dbvisit Standby on the standby database.

  • Line 7 – Transfer log gap for DEV: 2.

The second most important line to look at is the value for the Transfer Log Gap, and in this example, the value is 2. This value indicates the number of logs that still need to be transferred to the standby server. To resolve this gap you need to run Dbvisit Standby on the primary server again to ship the latest available logs.

  • Line 8 - Standby database time lag (DAYS-HH:MI:SS): +1:06:24.

The time displayed here provides you with an indication of how far behind in “Time” the standby database is from the primary. This value is calculated by looking at the current SCN number on the standby database, compared to the SCN number on the primary database. These numbers are converted to timestamps and the difference is then displayed.




3. The log gap report (using CLI)


To ensure the primary and standby databases are up to date, you can run the Log Gap Report using the following command from the primary database server:

./dbvctl -d <DDC> -i 

3.1. Single Instance Environment

Below is an example of running a Log Gap report in a Single Instance Primary environment.
Information for only one thread will be shown.


[oracle@dbv101 /usr/dbvisit/standby]$ ./dbvctl -d DEV -i
=============================================================
Dbvisit Standby Database Technology (8.0.01.17364) (pid 555)
dbvctl started on dbv101: Wed Sep 7 10:30:17 2016
=============================================================
Dbvisit Standby log gap report for DEV thread 1 at 201609071030:
-------------------------------------------------------------
Destination database on dbv102 is at sequence: 10.
Source database on dbv101 is at log sequence: 11.
Source database on dbv101 is at archived log sequence: 10.
Dbvisit Standby last transfer log sequence: 10.
Dbvisit Standby last transfer at: 2016-09-07 10:26:11.
Archive log gap for DEV: 0.
Transfer log gap for DEV: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:00:33.
=============================================================
dbvctl ended on dbv101: Wed Sep 7 10:30:22 2016
=============================================================
[oracle@dbv101 /usr/dbvisit/standby]$


3.2. Oracle RAC Primary Environment


Running the log gap report in an Oracle RAC environment will list information about all the threads in the Oracle RAC cluster.
The command to be executed is the same, but the result as you can see below will include information for all threads.


oracle@kiwi92[/acfs/dbvisit/standby]: ./dbvctl -d DEV -i
=============================================================
Dbvisit Standby Database Technology (8.0.01.18066) (pid 2545)
dbvctl started on kiwi912-vip: Sun Nov 6 13:49:09 2016
=============================================================
Dbvisit Standby log gap report for DEV thread 1 at 201611061349:
-------------------------------------------------------------
Destination database on kiwi812-vip is at sequence: 36.
Source database on kiwi912-vip is at log sequence: 38.
Source database on kiwi912-vip is at archived log sequence: 37.
Dbvisit Standby last transfer log sequence: 37.
Dbvisit Standby last transfer at: 2016-11-06 13:47:11.
Archive log gap for DEV2: 1.
Transfer log gap for DEV2: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:00:09.
Dbvisit Standby log gap report for DEV thread 2 at 201611061349:
-------------------------------------------------------------
Destination database on kiwi812-vip is at sequence: 20.
Source database on kiwi912-vip is at log sequence: 21.
Source database on kiwi912-vip is at archived log sequence: 20.
Dbvisit Standby last transfer log sequence: 20.
Dbvisit Standby last transfer at: 2016-11-06 13:47:12.
Archive log gap for DEV2: 0.
Transfer log gap for DEV2: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:00:09.
=============================================================
dbvctl ended on kiwi912-vip: Sun Nov 6 13:49:11 2016
=============================================================


4.  The log gap report (Using GUI)

This section provides you with an overview of how you can run the Log Gap Report using the Central Console (GUI).

Step 1:  Navigate to the Database Actions Menu option as shown below [1]



Step 2:  For the DDC in question (DEV in this example), click on the first icon highlighted (two pages on top of each other) as shown below [1].  This will start the log gap report process.


Step 3:  Review the log gap report as shown below.

  • The left side will be the source (primary) where the current sequence is shown (log sequence not archived yet)
  • On the right side, the destination (standby) last applied sequence is shown.
  • The middle part will show:
    • The time difference between the primary and standby  (based on SCN number)
    • The transfer gap indicates how many archive logs still needs to be transferred.
    • The archive log gap indicates how many archive logs still needs to be applied to the standby database.



To reduce the Time, Transfer or Archive Log gap, you need to enable the shipping and applying of logs