Wednesday 24 January 2018

RMAN-06059: expected archived log not found, loss of archived log compromises recoverability

RMAN backup failed with the below error message and its require archive log files to complete the RMAN backup.

Error:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 01/24/2018 03:35:09
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /u01/app/oracle/arch/1_282613_769193473.arc
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

This issue will happen If in case archive logs was deleted or corrupted.

Fix:

RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;

OR

If you are using catalog database to maintain RMAN repository instead of controlfile, you can try following command:

RMAN> resync catalog;

Run the backup again.

Wednesday 3 January 2018

How to Rotate or Purge Listener Log Data to Avoid Large listener.log File?

How to rotate or backup or rename listener.log or purge listener log data to avoid large listener.log file?

Below are the possible ways to rotate/rename listener.log files.

1) Stop the listener on a regular basis then you can simply rename the file at the OS level, then on next listener startup, a new one will be created.

OR

2) If you have a 24X7 environment and the listener can not be stopped, then you can use the following steps to rename / move the file without having to restart it:

LSNRCTL>
LSNRCTL> set current_listener <listenername>
LSNRCTL> set log_status off

In another window rename the log file. Then return to previous window

LSNRCTL> set log_status on

which will create a new and empty listener.log file which will continue logging. 


 OR

 3) Follow the document here:

Note 135063.1   How To Change the Listener Log Filename Without Stopping the Listener