4

I get the following error message when trying to restore the database from backup using RMAN.

rman target /

RMAN> set dbid=130474031
RMAN> configure device type 'sbt_tape' clear;
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;
RMAN> sql 'alter database mount';
RMAN> restore database;

Starting restore at 22-DEC-15
using channel ORA_DISK_1

creating datafile fno=1 name=/opt/oracle/oradata/prod/system01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/22/2015 12:47:01
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/opt/oracle/oradata/prod/system01.dbf'
RMAN>

EDIT

RMAN> restore database;

Starting restore at 22-DEC-15
using channel ORA_DISK_1

creating datafile fno=1 name=/opt/oracle/oradata/prod/system01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/22/2015 14:22:01
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/opt/oracle/oradata/prod/system01.dbf'

RMAN> exit


Recovery Manager complete.
[oracle@DR-Corebank ~]$ id
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[oracle@DR-Corebank ~]$ cd /opt/oracle/oradata/prod/
[oracle@DR-Corebank prod]$ touch aaa
[oracle@DR-Corebank prod]$ ls -ltr
total 875772
-rw-r----- 1 oracle oinstall 298631168 Dec 22 14:22 control03.ctl
-rw-r----- 1 oracle oinstall 298631168 Dec 22 14:22 control02.ctl
-rw-r----- 1 oracle oinstall 298631168 Dec 22 14:22 control01.ctl
-rw-r--r-- 1 oracle oinstall         0 Dec 22 14:22 aaa
[oracle@DR-Corebank prod]$ pwd
/opt/oracle/oradata/prod
[oracle@DR-Corebank prod]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p3     1.1T  163G  850G  17% /
/dev/cciss/c0d0p1     244M   18M  213M   8% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm
/dev/mapper/mpath0    493G  248M  467G   1% /opt/oracle2/u002
1
  • Do you have a backup of datafile 1? list backup of datafile 1; Is the database incarnation set correctly? list incarnation; Dec 22 '15 at 12:28
1

Community Wiki answer from a self-answer originally edited into the question (and based on a comment by Balazs Papp).

I forgot an incarnation:

RMAN> list incarnation;

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       PROD     130474031        PARENT  1          10-MAY-10
2       2       PROD     130474031        PARENT  195833299  21-OCT-10
3       3       PROD     130474031        PARENT  3655020271 06-OCT-12
4       4       PROD     130474031        PARENT  3655121615 08-OCT-12
5       5       PROD     130474031        CURRENT 5588371557 19-OCT-14

RMAN> reset database to incarnation 4;

database reset to incarnation 4

RMAN> restore database;

Starting restore at 22-DEC-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=10993 devtype=DISK

creating datafile fno=3 name=/opt/oracle/oradata/prod/sysaux01.dbf
creating datafile fno=4 name=/opt/oracle/oradata/prod/users01.dbf

The problem is now solved.

0

check if this directory /opt/oracle/oradata/prod/ exist and oracle user has the needed permission on this directory

0

In my case, I had to crosscheck backup before the restore succeeded. Somehow its status was EXPIRED.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.