RMAN backup tablepspace then drop table [message #303984] |
Mon, 03 March 2008 10:40 |
dariakon
Messages: 6 Registered: March 2008
|
Junior Member |
|
|
I backuped a tablespace, dropped a table within in, restore & and recover tablespace, but could not get the table back.
Why ?
SQL> create tablespace test4 datafile '+DB_DATA' size 20m;
Tablespace created.
SQL> create table t4 ( dt date) tablespace test4;
Table created.
SQL> insert into t4 values ( sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t4;
DT
-------------------
2008-03-03 08:04:07
-------------------------------------------------------
RMAN> backup tablespace TEST4 tag='BACKUP_TEST4';
Starting backup at 03-MAR-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00026 name=+DB_DATA/grdb/datafile/test4.394.648374623
channel ORA_DISK_1: starting piece 1 at 03-MAR-08
channel ORA_DISK_1: finished piece 1 at 03-MAR-08
piece handle=/opt/oracle/product/11.1.0/grdb/temp/17jaar0r_1_1 tag=BACKUP_TEST4 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-MAR-08
Starting Control File and SPFILE Autobackup at 03-MAR-08
piece handle=+DB_DATA/grdb/autobackup/2008_03_03/s_648375326.392.648375329 comment=NONE
Finished Control File and SPFILE Autobackup at 03-MAR-08
-------------------------------------------------------
SQL> drop table t4;
Table dropped.
-------------------------------------------------------
RMAN> sql 'alter tablespace test4 offline';
sql statement: alter tablespace test4 offline
RMAN> restore tablespace test4;
Starting restore at 03-MAR-08
using channel ORA_DISK_1
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 00026 to +DB_DATA/grdb/datafile/test4.394.648374623
channel ORA_DISK_1: reading from backup piece /opt/oracle/product/11.1.0/dw1/temp/17jaar0r_1_1
channel ORA_DISK_1: piece handle=/opt/oracle/product/11.1.0/dw1/temp/17jaar0r_1_1 tag=BACKUP_TEST4
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 03-MAR-08
RMAN> recover tablespace test4;
Starting recover at 03-MAR-08
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 03-MAR-08
RMAN> sql 'alter tablespace test4 online';
sql statement: alter tablespace test4 online
-------------------------------------------------------
1* select * from t4
SQL> /
select * from t4
*
ERROR at line 1:
ORA-00942: table or view does not exist
-------------------------------------------------------
|
|
|
|
|
|
|
|