考试网 >> IT认证 >> Oracle >> Oracle指导 >> Oracle冷备份的不完全恢复(上)

Oracle冷备份的不完全恢复(上)

发布时间:2006-06-28 10:35     点击:
分页:[1] 2 3 4  下一页

冷备份的不完全恢复:基于三种情况

一 冷备份.

   建立表空间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

分页:[1] 2 3 4  下一页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有