码迷,mamicode.com
首页 > 其他好文 > 详细

不完全恢复(基于时间)

时间:2015-01-05 16:22:59      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

1.先做一次冷全备

 

3.SQL> insert into t1 values(1,‘cyf1‘);

1 row created.

SQL> commit ;

Commit complete.


3.SQL> select to_char(sysdate ,‘yyyy-mm-dd hh24:mi:ss‘) from dual;

TO_CHAR(SYSDATE,‘YY
-------------------
2015-01-04 23:40:33


4.SQL> insert into t1 values(2,‘cyf2‘);

1 row created.

SQL> commit;

Commit complete.


SQL> drop table t1;

Table dropped.


5. SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

6.删除所有的数据文件
oracle@evancao cold]$ rm -rf *.dbf


7.[oracle@evancao cold]$ cp /orcl_backup/backup20150105/*.dbf /orcl_backup/cold

8.SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size 2228624 bytes
Variable Size 889196144 bytes
Database Buffers 637534208 bytes
Redo Buffers 7643136 bytes
Database mounted.

 


9.SQL> recover database until time ‘2015-01-04 23:40:33‘;
Media recovery complete.


10.SQL> alter database open resetlogs;


查询:SQL> select * from t1;

ID NAME
---------- -----------------------------------
1 cyf1

不完全恢复(基于时间)

标签:

原文地址:http://www.cnblogs.com/evancao350/p/4203850.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!