RMAN-03015: error occurred in stored script Memory Script
RMAN-20506: no backup of archivelog found
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 16 lowscn 500574 found to restore
RMAN-06025: no backup of log thread 1 seq 15 lowscn 500571 found to restore
RMAN-06025: no backup of log thread 1 seq 14 lowscn 500569 found to restore
RMAN-06025: no backup of log thread 1 seq 13 lowscn 487274 found to restore
RMAN-06025: no backup of log thread 1 seq 12 lowscn 487272 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 487077 found to restore
Reason for this problem:
the backup is not sufficient to complete the duplicate command, its an old backup.
more log files are needed to complete.
solution :
if there is no more backup available, use until clause in RMAN script.
eg:
RMAN> RUN
2> {
3> SET UNTIL SEQUENCE 11 THREAD 1;--recovers upto available log sequence 11 but not including log 11.
4> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
5> }
sample example:
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [oracle] ? clone
[oracle@rac2 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 29 12:54:45 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ? clone
[oracle@rac2 ~]$ rman target=sys/oracle@cdbs auxiliary=/
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 29 12:55:56 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CDBS (DBID=3126697048)
connected to auxiliary database: CLONE (not mounted)
RMAN> DUPLICATE TARGET DATABASE TO "clone" nofilenamecheck;
Starting Duplicate Db at 29-JUL-10
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK
contents of Memory Script:
{
set until scn 500597;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 29-JUL-10
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:47
Finished restore at 29-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725634775 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725634776 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725634776 filename=/u01/app/oracle/oradata/clone/users01.dbf
contents of Memory Script:
{
set until scn 500597;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK
starting media recovery
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=11
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=12
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=13
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=14
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=15
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=16
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19870: error reading backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19505: failed to identify file "/u01/app/oracle/backup/07ljv2pt_1_1"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/29/2010 13:13:33
RMAN-03015: error occurred in stored script Memory Script
RMAN-20506: no backup of archivelog found
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 16 lowscn 500574 found to restore
RMAN-06025: no backup of log thread 1 seq 15 lowscn 500571 found to restore
RMAN-06025: no backup of log thread 1 seq 14 lowscn 500569 found to restore
RMAN-06025: no backup of log thread 1 seq 13 lowscn 487274 found to restore
RMAN-06025: no backup of log thread 1 seq 12 lowscn 487272 found to restore
RMAN-06025: no backup of log thread 1 seq 11 lowscn 487077 found to restore
RMAN>
SQL> shut abort
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 29 14:29:43 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [clone] ?
[oracle@rac2 ~]$ rman target=sys/oracle@cdbs auxiliary=/
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 29 14:30:26 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CDBS (DBID=3126697048)
connected to auxiliary database: CLONE (not mounted)
RMAN> RUN
2> {
3> SET UNTIL SEQUENCE 11 THREAD 1;
4> DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
5> }
executing command: SET until clause
using target database control file instead of recovery catalog
Starting Duplicate Db at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK
contents of Memory Script:
{
set until scn 487077;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 29-JUL-10
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/CDBS_02ljuklm_1_1.bckp tag=TAG20100728T191707
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:38
Finished restore at 29-JUL-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725639677 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725639677 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725639678 filename=/u01/app/oracle/oradata/clone/users01.dbf
contents of Memory Script:
{
set until scn 487077;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 29-JUL-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK
starting media recovery
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19870: error reading backup piece /u01/app/oracle/backup/07ljv2pt_1_1
ORA-19505: failed to identify file "/u01/app/oracle/backup/07ljv2pt_1_1"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=7
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=8
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=9
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/06ljul8o_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/06ljul8o_1_1 tag=TAG20100728T192719
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:06
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf thread=1 sequence=6
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_6_725548321.dbf recid=2 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf thread=1 sequence=7
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_7_725548321.dbf recid=5 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf thread=1 sequence=8
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_8_725548321.dbf recid=1 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf thread=1 sequence=9
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_9_725548321.dbf recid=4 stamp=725639705
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf thread=1 sequence=10
channel clone_default: deleting archive log(s)
archive log filename=/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_10_725548321.dbf recid=3 stamp=725639705
media recovery complete, elapsed time: 00:00:07
Finished recover at 29-JUL-10
contents of Memory Script:
{
shutdown clone;
startup clone nomount ;
}
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 444596224 bytes
Fixed Size 1219904 bytes
Variable Size 130024128 bytes
Database Buffers 310378496 bytes
Redo Buffers 2973696 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/clone/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/undotbs01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/sysaux01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/users01.dbf";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed temporary file 1 to /u01/app/oracle/oradata/clone/temp01.dbf in control file
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/undotbs01.dbf recid=1 stamp=725639761
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/sysaux01.dbf recid=2 stamp=725639762
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/users01.dbf recid=3 stamp=725639763
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=725639761 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=725639762 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=725639763 filename=/u01/app/oracle/oradata/clone/users01.dbf
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 29-JUL-10
RMAN>
5 comments:
Thanks for great upload. This is very much helpful to beginers.
Hearty Thanks Teja for your comment.
Good work. Thank you
Rajasekhar A
what need to do if i want to log the output to a file
hi sir,
thank you for your valuble upload.
it is working very well.
Post a Comment