Professional Documents
Culture Documents
When you drop a tablespace, the controlfile will then no longer have
any records of the tablespace which has been dropped. Attempts to use
the RMAN RECOVER TABLESPACE command will return the RMAN error RMAN-
06019 – “could not translate tablespace name” as shown below.
Tablespace dropped.
The first option will require an outage of the entire database and
the entire database will be rolled back in tine in order to recover
the tablespace. The second option can be peformed online, but we will
need to factor in the disk space requirements to create a clone of
the database from which the tablespace has been dropped.
Let us examine the first option using the example shown below:
ttestdb:/u02/oradata/testdb/TESTDB/autobackup/2009_08_03> ls -lrt
total 63040
-rw-r----- 1 oracle dba 6455296 Aug 3 10:22
o1_mf_s_693915680_57dlgcqh_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 11:49
o1_mf_s_693920955_57dqkw0j_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 13:28
o1_mf_s_693926889_57dxcbdx_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:18
o1_mf_s_693928526_57f094n9_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:20
o1_mf_s_693930026_57f0fbo2_.bkp
Tablespace dropped.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
testdb:/u02/oradata/testdb/TESTDB/autobackup/2009_08_03> ls -lrt
total 75648
-rw-r----- 1 oracle dba 6455296 Aug 3 10:22
o1_mf_s_693915680_57dlgcqh_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 11:49
o1_mf_s_693920955_57dqkw0j_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 13:28
o1_mf_s_693926889_57dxcbdx_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:18
o1_mf_s_693928526_57f094n9_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:20
o1_mf_s_693930026_57f0fbo2_.bkp
-rw-r----- 1 oracle dba 6455296 Aug 3 14:38
o1_mf_s_693931114_57f1hbmo_.bkp
The most recent controlfile autobackup has been restored, but since
this has been taken after the tablespace was dropped, the tablespace
which has been dropped (ARUL) is not referenced in the control file
that we just restored. If we try to restore and recover the database,
the dropped tablespace will not be restored.
database mounted
released channel: ORA_DISK_1
The alert log will also show the time when the tablespace was
dropped. We can also see that a controlfile autobackup has taken
place after the tablespace was dropped.
Now that we know the time the tablespace was dropped, we can do a
point in time recovery of the DATABASE in order to recover the
tablespace which has been dropped.
RMAN> run {
2> set until time "to_date('03-AUG-2009 14:38:00','DD-MON-YYYY HH24:Mi:SS')";
3> restore database;
4> recover database;
5> }
RMAN>
database opened
We can now see that the tablespace which has been dropped has been
recovered
SQL> select file_name,bytes from dba_data_files where
2 tablespace_name='ARUL';
FILE_NAME
--------------------------------------------------------------------------------
BYTES
----------
/u02/oradata/testdb/arul01.dbf
37748736