DB Version : 11.2.0.1.0
OS Version : AIX 6.1
I have full backups (Level 0, Level 1, archives, controlfile, spfile) for a database. Now, i have to restore & recover this database on another server. I know few tablespaces which are not required. It means, those tablespace are just for backup of tables etc and if those tablespaces are not restored & recovered then also it fine. My main idea is to save time by not restoring & recovering unwanted files. Here is report schema output.
RMAN> report schema;
Report of database schema for database with db_unique_name CORE
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 2048 SYSTEM YES /u04/oradata/CORE/system01.dbf
2 1024 SYSAUX NO /u04/oradata/CORE/sysaux01.dbf
3 1024 UNDOTBS YES /u04/oradata/CORE/undots01.dbf
4 1046 USERS NO /u04/oradata/CORE/users01.dbf
5 1024 TEST_TAB NO /u04/oradata/CORE/test_tab01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 1024 TEMP 1024 /u04/oradata/CORE/temp01.dbf
I have used "RMAN> sql 'alter database datafile 4 offline for drop';" to take only datafile for tablespaces users offline. Below are the complete logs.
Recovery Manager: Release 11.2.0.1.0 - Production on Fri Feb 1 13:27:34 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
connected to recovery catalog database
RMAN> startup nomount
Oracle instance started
Total System Global Area 4275781632 bytes
Fixed Size 2213632 bytes
Variable Size 822085888 bytes
Database Buffers 3439329280 bytes
Redo Buffers 12152832 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 01-FEB-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=65 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=127 device type=DISK
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130201
channel ORA_DISK_1: AUTOBACKUP found: /oraclebackup/CORE/CTL_c-912678878-20130201-02
channel ORA_DISK_2: looking for AUTOBACKUP on day: 20130201
channel ORA_DISK_2: skipped, AUTOBACKUP already found
channel ORA_DISK_1: restoring control file from AUTOBACKUP /oraclebackup/CORE/CTL_c-912678878-20130201-02
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/oradata/CORE/control01.ctl
output file name=/u02/oradata/CORE/control02.ctl
output file name=/u03/oradata/CORE/control03.ctl
Finished restore at 01-FEB-13
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
released channel: ORA_DISK_2
RMAN> sql 'alter database datafile 4 offline for drop';
sql statement: alter database datafile 4 offline for drop
RMAN> restore database;
Starting restore at 01-FEB-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=96 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=127 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /u04/oradata/CORE/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u04/oradata/CORE/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u04/oradata/CORE/test_tab01.dbf
channel ORA_DISK_1: reading from backup piece /oraclebackup/CORE/DF_L0_CORE_01022013_2no0slbn_87_1
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00001 to /u04/oradata/CORE/system01.dbf
channel ORA_DISK_2: restoring datafile 00003 to /u04/oradata/CORE/undots01.dbf
channel ORA_DISK_2: reading from backup piece /oraclebackup/CORE/DF_L0_CORE_01022013_2oo0slbn_88_1
channel ORA_DISK_2: piece handle=/oraclebackup/CORE/DF_L0_CORE_01022013_2oo0slbn_88_1 tag=LEVEL0
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:04:06
channel ORA_DISK_1: piece handle=/oraclebackup/CORE/DF_L0_CORE_01022013_2no0slbn_87_1 tag=LEVEL0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:04:16
Finished restore at 01-FEB-13
RMAN> recover database;
Starting recover at 01-FEB-13
using channel ORA_DISK_1
using channel ORA_DISK_2
starting media recovery
archived log for thread 1 with sequence 1 is already on disk as file /u05/oradata/CORE/CORE_11806244987.ARC
archived log for thread 1 with sequence 2 is already on disk as file /u05/oradata/CORE/CORE_21806244987.ARC
archived log file name=/u05/oradata/CORE/CORE_11806244987.ARC thread=1 sequence=1
archived log file name=/u05/oradata/CORE/CORE_21806244987.ARC thread=1 sequence=2
unable to find archived log
archived log thread=1 sequence=3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/01/2013 13:37:07
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 3 and starting SCN of 365298
RMAN> alter database open resetlogs;
database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
But in logs i can see that datafile 4 is still restored which means i am spending extra time on restoring file which i don't need. Is there any way to achive this ?