To delete an archive file of the master database in the Maximum Availability and Maximum Performance modes of Oracle Data Guard, the archive file must be deleted after the backup database is applied.
For Maximum Protection mode, logs in this mode are written to the master database and the slave database at the same time. Therefore, in this mode, there is no limit on deleting and archiving the master database. You can delete it directly.
In Maximum Availability and Maximum Performance, if delete input is added when RMAN backs up the archive file, how can we determine whether to delete the archive file if you love it.
In versions earlier than 10 Gb, you can only use an operating system script to determine the application status of the archive files in the Standby database before deleting the archive files, the application can be deleted normally on the Primary end.
InOracle 10gAfter,RMANYou can configure an archive deletion policy:Configure archivelog deletion policy
This policy corresponds to two values:
APPLIED ON STANDBY:When this value is setDELETE INPUTDelete clauseStandbyWhen logs are still required by the database, a prompt is displayed.RMAN-08137Error. However, you can still manuallyDELETE ARCHIVELOG.
NONE:If this parameter is set, the archive deletion policy is not enabled.By defaultNONE.
Let's configure:
RMAN> configure archivelog deletion policy to applied on standby;
Old RMAN configuration parameters:
Configure archivelog deletion policy to applied on standby;
New RMAN configuration parameters:
Configure archivelog deletion policy to applied on standby;
New RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archivelog deletion policy
Here is a warning, Solution,Run the following command:
SQL> alter system set "_ log_deletion_policy" = ALL scope = spfile sid = '*';
After setting this parameter,DBRestart required.
After the modification, we set:
RMAN>Configure archivelog deletion policy to applied on standby;
Using target database control file instead of recovery catalog
Old RMAN configuration parameters:
Configure archivelog deletion policy to applied on standby;
New RMAN configuration parameters:
Configure archivelog deletion policy to applied on standby;
New RMAN configuration parameters are successfully stored
RMAN>Configure archivelog deletion policy to none;
Old RMAN configuration parameters:
Configure archivelog deletion policy to applied on standby;
New RMAN configuration parameters:
Configure archivelog deletion policy to none;
New RMAN configuration parameters are successfully stored
Modified successfullyRMAN.