SQL> create table jglu.test_recover
2 tablespace test
3 as
4 select * from dba_tables;
Table created.
SQL> alter tablespace test offline;
Tablespace altered.
SQL> host cp /u01/backup/test02.dbf /u01/app/oracle/oradata/orcl
SQL> recover tablespace test;
Media recovery complete.
SQL> alter tablespace test online;
Tablespace altered.
SQL> select count(*) from jglu.test_recover;
COUNT(*)
----------
1582
对于普通的CTAS操作建立的表,数据是可以进行恢复的。
下面看看nologging的表
SQL> create table test_unrecover nologging
2 tablespace test
3 as
4 select * from dba_tables;
Table created.
SQL> alter tablespace test offline;
Tablespace altered.
SQL> host cp /u01/backup/test02.dbf /u01/app/oracle/oradata/orcl
SQL> recover tablespace test;
Media recovery complete.
SQL> alter tablespace test online;
Tablespace altered.
SQL> select count(*) from jglu.test_unrecover;
select count(*) from jglu.test_unrecover
*
ERROR at line 1:
ORA-00942: table or view does not exist
通过CREATE AS SELECT NOLOGGING方式建立的数据表不会产生日志,因此恢复操作不会恢复表中的数据,而且恢复操作也不会报错。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271283/viewspace-1016357/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/271283/viewspace-1016357/