Tuesday, December 17, 2013

ORA-01580 : error creating control backup file


ORA-01580 : error creating control backup file

##########################
## Error
##########################

ORA-01580: error creating control backup file /u01/app/oracle/product/11.2/db_4/dbs/snapcf_oralin01p_2.f
ORA-27040: file create error, unable to create file

### Full Error

Starting Control File and SPFILE Autobackup at 2013-12-17:00:17:53
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_SBT_TAPE_1 channel at 12/17/2013 00:18:09
ORA-01580: error creating control backup file /u01/app/oracle/product/11.2/db_4/dbs/snapcf_oralin01p_2.f
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory

##########################
#  Error Occurred
##########################

Error occured while a scheduled FULL backup is run in 11.2.0.3.0 version

##########################
## Command Executed
##########################

Full Database backup command

**************************************************************** Step By Step Analysis ***********************************************************************

#########################################
# 1) Check the Snapshot Controlfile
#########################################

RMAN> show snapshot controlfile name;

RMAN configuration parameters for database with db_unique_name oralin01P_STL are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2/db_4/dbs/snapcf_oralin01p_2.f';

RMAN>

=====================================================================================================================

#########################################
# 2) Reason for Failure
#########################################

Error is occuring when autobackup of controlfile is being done. Whenever oracle tries to update the recovery catalog, it checks with recovery catalog to find how much updated recovery catalog is.

So when trying to backup the controlfile, RMAN tries to write the information to snapshot controlfile. If a snapshot controlfile is not available then RMAN creates a new file.

In our Case, both updating the existing file and new file creation failed with the below error.

=====================================================================================================================
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
=====================================================================================================================

#########################################
# 3) Reproduce the Error
#########################################

A simple Resync will help us to reproduce the error.

oralin01p_2 @ hostp03:/u01/app/oracle/product/11.2
> rman target / catalog rman_user/****@rcat

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Dec 17 03:49:13 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: oralin01P (DBID=4249580499)
connected to recovery catalog database

RMAN> resync catalog;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 12/17/2013 03:53:34
ORA-01580: error creating control backup file /u01/app/oracle/product/11.2/db_4/
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory

#########################################
# Alert Log
#########################################

Tue Dec 17 03:53:33 2013
Errors in file /u01/app/oracle/diag/rdbms/oralin01p_stl/oralin01p_2/trace/oralin01p_2_ora_27685.trc:
ORA-01580: error creating control backup file /u01/app/oracle/product/11.2/db_4/dbs/snapcf_oralin01p_2.f
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory

=====================================================================================================================

#########################################
# 4) Check PATH for snapshot controlfile
#########################################

oralin01p_2 @ hostp03:/u01/app/oracle/product/11.2
> ls
agent11g  db_1  db_10  db_11  db_2  emcli  lost+found
oralin01p_2 @ hostp03:/u01/app/oracle/product/11.2

=====================================================================================================================
If we can see from above, there is no DB_HOME db_4, so because of this Snapshot controlfile creation/update fails.
=====================================================================================================================

#########################################
# 5) Configure Snapshot Controlfile
#########################################

Snapshot Controlfile should be in Shared Location, else we will face ORA-00245 Error

http://stepintooracledba.blogspot.com/2013/04/ora-00245-control-file-backup-failed.html

=====================================================================================================================
Before Configuring snapshot controlfile, lets see if any file exists in that location
=====================================================================================================================

ASMCMD [+oralin01P_RECO] > ls -lt
Type         Redund  Striped  Time             Sys  Name
                                               Y    oralin01P_STL/
ASMCMD [+oralin01P_RECO] >

No file Exists

##########################
## Solution
##########################

configure snapshot controlfile name to '+oralin01P_RECO/snapcf_oralin01p.f';

RMAN> configure snapshot controlfile name to '+oralin01P_RECO/snapcf_oralin01p.f';

old RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2/db_4/dbs/snapcf_oralin01p_2.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+oralin01P_RECO/snapcf_oralin01p.f';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

=====================================================================================================================
New file named snapcf_oralin01p.f is created.
=====================================================================================================================

ASMCMD [+oralin01P_RECO] > ls -lt
Type         Redund  Striped  Time             Sys  Name
                                               Y    oralin01P_STL/
                                               N    snapcf_oralin01p.f => +oralin01P_RECO/oralin01P_STL/CONTROLFILE/Backup.1698.834378939
ASMCMD [+oralin01P_RECO] >


Now Resync of Catalog is working good.

RMAN>  resync catalog;

starting full resync of recovery catalog
full resync complete


=====================================================================================================================

No comments: