1. Introduction
The Dbvisit Standby Archive Log Management Module (AMM) fully automates the management and monitoring of the Oracle database archive log space on the primary as well as the Dbvisit ARCHDEST location on the standby server.
By default when creating a new DDC file in version 10, the AMM module is disabled for the primary database. This is to ensure the Dbvisit AMM module does not interfere with archive log purging options implemented as part of RMAN backup strategies. We do however recommend that you leave at least one day worth of archive logs on the primary server and not delete all archive logs following a backup, as they may not have been transferred to the standby database server.
Unlike the Oracle database files location, the Oracle archive logs location needs to be monitored and managed constantly to ensure the database continues its optimal operation. If the disk space available to Oracle archive logs is used up, the whole database will "freeze" and not allow any update or insert operation.
Dbvisit Standby Archive Log Management Module includes the following options:
Alerts through email when Oracle archive logs have reached a set threshold of available disk space.
Can delete Oracle archive logs after a set number of days.
Can ensure that only x number of Oracle archive log files remain on the server.
Can delete Oracle archive logs after available disk space has been used up to ensure continual database operation.
Ensures the Oracle archive logs have been sent to the standby database before removing any logs.
Can integrate with Backup software to ensure logs have been backed up before removing.
Dbvisit Standby is not replacing your backup scripts or backup software.
It is important that you still backup your database and archive log to a different storage or a tape device.
2. AMM and Multiple Standby Databases
In the case of multiple standby databases, Dbvisit Standby checks if a log has been transferred to all active standby databases before deleting it on the primary.
A standby database is considered to be active if a Dbvisit process has run within the last DBV_LAST_RUN_OFFSET days to ship logs to this database from the primary.
Note the default value:
DBV_LAST_RUN_OFFSET=1
3. Dbvisit Standby AMM processing overview
The order of precedence in managing the log files are:
If there are log files older than DAYS_TO_KEEP_ARCHSOURCE, then delete these.
If there are more log files than NUM_ARCHSOURCE_TO_KEEP, then delete these (oldest ones first).
If there are more logs that have been backed up by RMAN at least ARCHSOURCE_BACKUP_COUNT times, then delete these.
If the THRESHOLD_ARCHSOURCE < mount point fullness criteria are met, then mark archives for deletion (oldest ones first). The number of archives marked for deletion is HOWMANY_ARCHSOURCE. The archives will only be deleted if DELETE_ARCHSOURCE=Y. After deletion of the archives, and the criteria are still met (THRESHOLD_ARCHSOURCE < mount point fullness), then mark more archives for deletion (number of archives marked for deletion will be again HOWMANY_ARCHSOURCE, and oldest ones first). This process will continue until the criteria are no longer met.
If DELETE_ARCHSOURCE=N, then only a warning email will be sent. No archives will be deleted when the THRESHOLD_ARCHSOURCE < mount point fullness criteria are met. Setting variable DELETE_ARCHSOURCE=N has no influence over DAYS_TO_KEEP_ARCHSOURCE and NUM_ARCHSOURCE_TO_KEEP. These will still delete archive files when their criteria are met.
4. Dbvisit Standby AMM log file
The Dbvisit Standby Archive Log Management Module (AMM) produces a separate log file to the Dbvisit Standby database processing. The log file can be found in the same location as the Dbvisit Standby database log file. The log file is called <DDC>_arch_management.log. The location is determined by the LOGDIR and LOGDIR_DR settings in the DDC file.
5. Archivelog Management Settings
This section provides an overview of the variables that can be configured for the AMM module with regards to the Primary Database. Unlike the previous versions, the archivelog management module is completely separated from the DDC configurations and now can be edited directly from control center.
From the above screen shot the numbers 1 to 7 indicate the settings for managing oracle archivelogs in the primary database, this is optional if you have your backup jobs that take care of deleting the archivelogs , you can leave this setting disabled. Remember the archivelogs must be retained for the dbvisit process to transfer it from primary tostandby. The setting indicated from number 8 to 12 are for managing the standby database archivelogs.
5.1 Primary Archive Management Settings
( 1 ) Enable archivelog management on primary: By default, this setting is set to No and you can enable it when you want Dbvisit to manage the archivelogs from the primary database.
( 2 ) Number of archivelogs to keep: Specifies the number of archive log files to keep on the primary server. Log files greater than this number will be removed (oldest first).To disable this setting, set it to 0. If you are not sure, set it to 0 (disable).
( 3 ) Days to keep archive log files: Specify the number of days to keep the archive log files on the primary server. If this value (in days) is reached, the log files will be removed from the server. To disable this setting, set it to 0, if you are not sure, set it to 7. Ensure that enough disk space is available to store the archive logs.
( 4 ) Number of times an archive log has to be backed up by RMAN before being deleted: Specify the number of times an archive log has to be backed up by RMAN before Dbvisit Standby deletes it from the primary server. To disable this setting, set it to 0 which is the default value.
( 5 ) Threshold in % of how much disk space may be used: Specifies the threshold in percentage (%) of how much disk space may be taken up by the archive log files on disk before an alert is triggered on the primary server. A value of 80 means at 80% space threshold is reached, an alert will be triggered. Please specify the threshold as an integer.
( 6 ) Threshold in % of how much FRA space may be used: Specifies the threshold in percentage (%) of how much FRA (flash/fast recovery area) space may be taken up by the archive log files on disk before an alert is triggered on the primary server. A value of 80 means at 80% FRA space threshold is reached, an alert will be triggered. Please specify the threshold as an integer.
( 7 ) Delete archive files once threshold is reached?: Specify if archive log files should be deleted once the percentage threshold (Threshold in % of how much disk space may be used) on the primary server is reached. Once the threshold is reached oldest archive log files are deleted first. By default, this is set as No and Multiplatform notification will send out an email or slack notification once this is reached if enabled.
There is no verification that these log files have been backed up. Dbvisit Standby does not perform backups, this should be configured outside the Dbvisit Standby product.
This setting has no influence on whether (archive) log files are deleted for the Number of archivelogs to keep or Days to keep archive log files. These settings will delete (archive) log files once the percentage threshold is met.
5.2 Standby Archive Management Settings
( 8 ) Enable Archive Management on Standby: Specifies if the AMM module to manage the archive log files is turned on or off on the standby server. This is recommended to set to yes as it will manage the archivelogs that are shipped from primary to standby’s Archivelog destination location(ARCHDEST).
( 9 ) Number of archive log files to keep: Specifies the number of archive log files to keep on the standby server. Log files greater than this number will be removed (oldest first).To disable this setting, set to 0. If you are not sure, set to 0 (disable).
( 10 ) Days to keep archive log files: Specifies the number of days to keep the archive log files on the standby server. After this, the log files will be removed from the server. This is specific to the archive log destination location in standby from which the archivelog is applied. The archive logs are sent from primary to standby.
( 11 ) Threshold in % of how much disk space may be used: Specifies the threshold in percentage (%) of how much disk space may be taken up by the archive log files on disk before an alert is triggered on the standby server.
( 12 ) Delete archive files once threshold is reached?: Specifies if the archive log files should be deleted once the percentage threshold (THRESHOLD_ARCHDEST) on the standby server is reached. Once the threshold is reached the oldest (archive) log files are deleted first.
There is no verification that these log files have been backed up, this (backups) is outside the scope of Dbvisit Standby
This setting has no influence on whether archive log files are deleted for Days to keep archive log files or Number of archive log files to keep. These settings will delete archive log files once the percentage threshold is met.
Below is an example of the archive log management settings from both primary and standby. In this example we have set for both primary and standby. We recommend checking the archivelog and database backup schedules and deletion frequencies before enabling this in the primary.