Hello everyone.
This is the scenario:
We have a test server which is used to restore the daily backups from the Production Database. We restore the database with the same SID as the production one.
For some specific reasons we need to create a second database (with a different SID) on this server with an older backup from the production one. To achieve that I am trying to use some of the "DUPLICATE without connection to target" tutorials on the web.
I am trying the most simple guide i found which is:
1) Copy the cold backup files do /somedirectory
2) Start OLDER database with nomount
3) Connect RMAN with OLDER as auxiliary
4) Run the following: DUPLICATE DATABASE TO OLDER BACKUP LOCATION '/somedirectory' NOFILENAMECHECK;
Here is the output (I removed some lines due to the size of it):
----------------------
RMAN> DUPLICATE DATABASE ProdDB TO OlderDB
2> BACKUP LOCATION '/home/oracle/OlderBackupFiles'
3> NOFILENAMECHECK;
4>
Starting Duplicate Db at 01-OCT-14
contents of Memory Script:
{
sql clone "alter system set control_files =
''+DATA/OlderDB/controlfile/current.829.859839217'' comment=
''Set by RMAN'' scope=spfile";
sql clone "alter system set db_name =
''ProdDB'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''OlderDB'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile from '/home/oracle/OlderDB/controlfile_ProdDB_20141001_4159.bkp';
alter clone database mount;
}
executing Memory Script
sql statement: alter system set control_files = ''+DATA/OlderDB/controlfile/current.829.859839217'' comment= ''Set by RMAN'' scope=spfile
sql statement: alter system set db_name = ''ProdDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''OlderDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
(...)
Starting restore at 01-OCT-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=191 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=+DATA/OlderDB/controlfile/current.829.859839217
Finished restore at 01-OCT-14
database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=191 device type=DISK
contents of Memory Script:
{
set until scn 274262921;
set newname for clone datafile 1 to new;
set newname for clone datafile 2 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 4 to new;
set newname for clone datafile 5 to new;
set newname for clone datafile 6 to new;
set newname for clone datafile 7 to new;
restore
clone database ;
}
(...)
Starting restore at 01-OCT-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00002 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00005 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00006 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00007 to +DATA
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/OlderDB/database_ProdDB_20141001_4157.bkp
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /home/oracle/OlderDB/database_ProdDB_20141001_4157.bkp
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15041: diskgroup "DATA" space exhausted
failover to previous backup
Oracle instance started
(...)
contents of Memory Script:
{
sql clone "alter system set db_name =
''OlderDB'' comment=
''Reset to original value by RMAN'' scope=spfile";
sql clone "alter system reset db_unique_name scope=spfile";
shutdown clone immediate;
}
executing Memory Script
Errors in memory script
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01507: database not mounted
ORA-06512: at "SYS.X$DBMS_RCVMAN", line 13466
ORA-06512: at line 1
RMAN-05556: not all datafiles have backups that can be recovered to SCN 274262921
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/01/2014 15:39:11
RMAN-05501: aborting duplication of target database
Recovery Manager complete.
------------------------------------------------------------------
The first error on the stack was ORA-19504 while trying to restore the database backup.
First thing i took a look was ASM occupation but it have space enough available.
The second was some permission issue but it does not seem to be the case because RMAN could write the controlfile correctly to the ASM.
Does any one have some tip about what should I look for?
Thanks in advance an sorry about my english.
Mark.