Tuesday 9 September 2014

ORA-01180: can not create datafile 1 ORA-01110: data file 1: '/dir/system01.dbf' during RMAN restore.

I got this error while trying do a full database restore to another host. I have always done same without issues.

Changes:
The source database is now the primary in a ADG set up.
Source database now has FRA confirgured.
Source database opened with reset logs during a migration to a new host as the original host had to be maintained.

Road to resolution:

At first I checked the directory on the new host to confirm that oracle user has appropriate permission to write to the directory.

I also checked to ensure that the backup sets are fully cataloged and that the restored control file is the most recent.

I tried the process one more time and still got the same error.

I went on MOS and found two notes ID 1265151.1 & ID 392237.1.
 
RMAN restore fails with ORA-01180: can not create datafile 1 (Doc ID 1265151.1)


RMAN restore of database fails with ORA-01180: Cannot create datafile 1 (Doc ID 392237.1)

"The current incarnation only contains incremental level 1 backups of the database.
There are NO level 0 backups in this incarnation.
As the physical datafiles do not exist RMAN attempts to create the physical files but this is NOT allowed if the file belongs to the SYSTEM tablespace."

solution: Reset the database to the previous incarnation and run the restore and recovery again:
 select count(*) from v$database_incarnation;

  COUNT(*)
----------
         4
SQL> select INCARNATION#, RESETLOGS_TIME from  v$database_incarnation order by RESETLOGS_TIME desc;

INCARNATION# RESETLOGS_TIME
------------ --------------------
           4 02:28:32 19:aug:2014
           2 04:23:11 08:aug:2014
           3 10:03:41 25:jul:2014
           1 07:01:36 09:dec:2011

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

>rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Sep 9 13:04:29 2014

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

connected to target database: XXXXXX (DBID=111111111, not open)

RMAN> reset database to incarnation 2;

RMAN>restore database;


Walla!!! it was successful.









No comments:

Post a Comment