Thursday, February 25, 2010

Bad SnapShot Controlfile Configuration

Have you ever configured your snapshot controlfile incorrectly?

Can you no longer resync your catalog?

Are you getting the following messages

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 02/04/2010 13:52:00
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 02/04/2010 13:52:00
ORA-01580: error creating control backup file /home/luke/rman_backup_area/test/scf/test_scf.f
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory 

You cannot now just change the entry whilst connected to the catalog like so

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/rman_backup_area/test/scf/test_scf.f';

As to do so it requires that the catalog be resync'ed but it can't do that because it cannot write a snapshot controlfile! Ahh!

To resolve the issue there are 2 solutions that I know of

1. Using RMAN connect to the target with no catalog

rman target / nocatalog
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/rman_backup_area/test/scf/test_scf.f';

2. Use the DBMS_BACKUP_RESTORE package from the database

EXECUTE SYS.DBMS_BACKUP_RESTORE.CFILESETSNAPSHOTNAME ('/home/oracle/rman_backup_area/test/scf/test_scf.f');