Archive for 'Dbvisit tips'

Dbvisit by default will send an email notification everytime that it is run on the primary and standby server. This is useful during the testing phase so that you get a sense of how Dbvisit is working.

However after the testing phase you only want to be notified by Dbvisit if there is an error or a threshold has been exceeded.
This can be easily done by setting the SUCCESSMAIL=No in the Dbvisit Database Configuration (DDC) file.

For example say your database is called w120n. Your DDC file will be called dbv_w120n.env.
Edit this file with any text editor on the primary server only:

[40 Mail Settings]
MAILCFG_MAIL_CLIENT = dbvisit
SUCCESSMAIL = No
SUCCESSMAIL_DR = No
...

Set both SUCCESSMAIL=No and SUCCESSMAIL_DR=No.
This will ensure Dbvisit will only email when there is an error or an alert on both the primary and standby servers.

Dbvisit will continue to send a heartbeat every day to ensure the emailing functionality is working.

The DDC file contains all the Dbvisit configurational settings. For each setting there is also an explanation into the function of the setting. The DDC should only be updated on the primary server. The next time Dbvisit is run on the primary server, it will automatically copy over the DDC file to the standby server if it detects an update.

To test the email functionality of Dbvisit use the dbv_functions -m command.
This will send an email to the email address(es) specified by the ADMINS parameter in the Dbvisit Database Configuration (DDC) file.

For example for the w112g primary database run the command as follows:

$ dbv_functions -m w112g
=============================================================
Dbvisit Standby Database Technology (5.2.25.4075) (pid 3958)
dbv_functions started on dbvisit11: Fri Apr 30 15:38:57 2010
=============================================================

Sending schedular heartbeat message to dba_guru@companyxx.com.

This command can be used to test the email functionality is working. By default Dbvisit will send a test email every day to ensure the email functionality is still working. To specify the time that Dbvisit sends this test or heartbeat email is set by variable SEND_HEARTBEAT_TIME24. By default this is set to 7:00am.

It is also possible to send an attachment in the email. Specify the same command with a valid filename. This filename will then be emailed to the user specified by ADMINS as an attachment:

$ dbv_functions -m w112g dbv_w112g.env
=============================================================
Dbvisit Standby Database Technology (5.2.25.4075) (pid 3958)
dbv_functions started on dbvisit11: Fri Apr 30 15:38:57 2010
=============================================================

Attachment filesize is 33478 bytes

Sending schedular heartbeat message to dba_guru@companyxx.com.
with attachment dbv_w112g.env

In this example the DDC file (dbv_w112g.env) was sent to email dba_guru@companyxx.com as an attachment. You can use this command to send trace files or other relevant Dbvisit files to yourself.

The command can be run both on the primary and the standby database.

Welcome to the Dbvisit tip of the week.

To find transfer information about the last log that Dbvisit has transferred use the dbv_functions -N command run on the primary server. For example for the w112g primary database run the command as follows:

$ dbv_functions -N w112g
Dbvisit Database configuration (DDC) file dbv_w112g.env.
<<<>>>
oracle_sid             => w112g
sequence#              => 4
thread_num             => 1
log_id                 => 716466692
archive_name           => /oracle/flash_recovery_area/W112G/archivelog/2010_04_18/o1_mf_1_4_5wo
process_id             => 3748
process                => TRANSFER
timestamp              => 201004190307
datestamp              => 2010/04/19:03:07
start_time_date        => 2010/04/19:03:08
end_time_date          => 2010/04/19:03:08
source_host            => dbvisit51
destination_host       => dbvisit52
checksum               => cb3eacfd0be802c5999e9fd682c6c46b50a0ccba
size_in_bytes          => 9660283
size_in_mb             => 9.21
process_completed      => Y

To display information about a specific log file add the sequence number:

$ dbv_functions -N 3 w112g
Dbvisit Database configuration (DDC) file dbv_w112g.env.
<<<>>>
oracle_sid             => w112g
sequence#              => 3
thread_num             => 1
log_id                 => 716466692
archive_name           => /oracle/flash_recovery_area/W112G/archivelog/2010_04_17/o1_mf_1_3_5wl
process_id             => 3748
process                => TRANSFER
timestamp              => 201004190307
datestamp              => 2010/04/19:03:07
start_time_date        => 2010/04/19:03:07
end_time_date          => 2010/04/19:03:08
source_host            => dbvisit51
destination_host       => dbvisit52
checksum               => e6ab447f4c4df5bc64868a6b1baece595a8defbd
size_in_bytes          => 9433837
size_in_mb             => 9
process_completed      => Y

The above displays information about the transfer process. It is also possible to display information about the COMPRESS step:

$ dbv_functions -N 3 w112g COMPRESS
Dbvisit Database configuration (DDC) file dbv_w112g.env.
<<<>>>
oracle_sid             => w112g
sequence#              => 3
thread_num             => 1
log_id                 => 716466692
archive_name           => /oracle/flash_recovery_area/W112G/archivelog/2010_04_17/o1_mf_1_3_5wl
process_id             => 3748
process                => COMPRESS
timestamp              => 201004190307
datestamp              => 2010/04/19:03:07
start_time_date        => 2010/04/19:03:07
end_time_date          => 2010/04/19:03:07
source_host            => dbvisit51
destination_host       => dbvisit52
checksum               => 22e4ece6822f1ef951078992600f00a719de1a43
size_in_bytes          => 42861568
size_in_mb             => 40.88
process_completed      => Y

This shows that for sequence 3, the log file was 40Mb in size, and after compression and during transfer it was only 9Mb in size.