Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RMAN Recovery of database taken using EXCLUDE TABLESPACE Clause

672273Jan 13 2010 — edited Jan 13 2010
Hi,
I am using Oracle 11.1.0.7 database on AIX 6.1 64-bit system.

We have our source database having size 33TB. So taking backup of such huge database in whole will take much time and it will require much more disk storage to place backup. Thats why we want to use the skip tablespace clause to exclude old tablespaces and create backup of only current year's tablespaces.
========================================
---------------------
We mark few tablespaces to be skipped during the backup
----------------------
CONFIGURE EXCLUDE FOR TABLESPACE 'SOR_DATA';
CONFIGURE EXCLUDE FOR TABLESPACE 'EDWUSER_DATA';
CONFIGURE EXCLUDE FOR TABLESPACE 'STG_DATA';
CONFIGURE EXCLUDE FOR TABLESPACE 'AA_DATA';
CONFIGURE EXCLUDE FOR TABLESPACE 'AA_DATA_TEST';
CONFIGURE EXCLUDE FOR TABLESPACE 'SOR_INDEXES';
CONFIGURE EXCLUDE FOR TABLESPACE 'SOR_DATA_HIST2';
CONFIGURE EXCLUDE FOR TABLESPACE 'AA_DATA_HIST';
----------------------
We took full rman backup using following command:
----------------------
backup incremental level 0 cumulative device type disk filesperset = 8 tag '%TAG' database;
----------------------
Our backup was successfully completed (i have checked the backup log).

Now we are moving our backup to our production environment and while restoring the database we used following commands:

sqlplus / as sysdba
startup nomount
exit

rman target / nocatalog
restore controlfile from '/u04/WTEDWT/RMAN_BKP/c-3207464281-20100111-00';
alter database mount;

catalog backuppiece '/u04/WTEDWT/RMAN_BKP/dil37bqj_1_1';
catalog backuppiece '/u04/WTEDWT/RMAN_BKP/djl37bqj_1_1';
catalog backuppiece '/u04/WTEDWT/RMAN_BKP/dkl37bqj_1_1';
catalog backuppiece '/u04/WTEDWT/RMAN_BKP/dml37bqk_1_1';
catalog backuppiece '/u04/WTEDWT/RMAN_BKP/dll37bqk_1_1';
catalog backuppiece '/u04/WTEDWT/RMAN_BKP/dnl37bql_1_1';
catalog backuppiece '/u04/WTEDWT/RMAN_BKP/dol37bql_1_1';

run {
SET UNTIL SCN 5973000450165;
SET NEWNAME FOR DATAFILE 1 TO '/u04/WTEDWT/datafiles/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/u04/WTEDWT/datafiles/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/u04/WTEDWT/datafiles/sordata_07.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/u04/WTEDWT/datafiles/users01.dbf';
..........................
..........................
..........................
restore database;
switch datafile all;
recover database;
}

-----------------------------------------------------
But after restoring the datafiles, it prompt us following error (I think it prompt error which switching the files):

channel ORA_DISK_7: restore complete, elapsed time: 00:22:17
failover to previous backup
Finished restore at 12-JAN-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of switch command at 01/12/2010 12:19:35
RMAN-20230: datafile copy not found in the recovery catalog
RMAN-06015: error while looking up datafile copy name: /u04/WTEDWT/datafiles/sordata_07.dbf

I have checked the DB_CREATE_FILE_DESTINATION dir i.e. /u04/WTEDWT/datafiles directory and it is having only the datafiles which we required and the skipped tablespaces's datafiles are not there which is required. but the above error is pointing to the datafile of tablespace which we marked to be skipped during complete backup.

Please help me in in resolving this issue.

Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2010
Added on Jan 13 2010
11 comments
4,281 views