冷备份的不完全恢复:基于三种情况
一 冷备份.
建立表空间test,用户test,表名test 插入数据
insert into test.test(a,b) values(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),to_char(sysdate,'yyyy-mm-dd hh24:mi’));
commit;
alter system archive log current;
进行了两个事务(commit)和日志切换
commit;
alter system archive log current;日志切换同时归档
select checkpoint_change#,archive_change# ,controlfile_change# from v$database;
1 984675 983549 984675 初始备份时的scn
此时进行冷备份
执行shutdown immediate
拷贝所有的数据文件,控制文件,在线日志文件,归档日志文件,如果需要,spfile,密码文件
最好多拷贝几份,以便反复测试使用。
二、添加数据文件
startup
打开数据库
删除test.test 表中的所有数据
然后插入数据
insert into test.test(a,b) values(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),to_char(sysdate,'yyyy-mm-dd hh24:mi’));
commit;
alter system archive log current;
进行了两个事务(commit)和日志切换
commit;
前14条每两个进行一个commit,同时alter system archive log current;
后面的
每一个进行commit;
alter system archive log current;
select * from test.test
1 2005-12-17 16:41:41 2005-12-17 16:41:41
2 2005-12-17 16:42:36 2005-12-17 16:42:36
3 2005-12-17 16:29:14 2005-12-17 16:29:14
4 2005-12-17 16:28:26 2005-12-17 16:28:26
5 2005-12-17 16:28:27 2005-12-17 16:28:27
6 2005-12-17 16:29:12 2005-12-17 16:29:12
7 2005-12-17 16:29:49 2005-12-17 16:29:49
|
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容 本站提醒:不要进行人身攻击。谢谢配合。 |