设为首页 加入收藏

TOP

Oracle穿越incarnation恢复数据(三)
2014-11-24 02:21:46 来源: 作者: 【 】 浏览:4
Tags:Oracle 穿越 incarnation 恢复 数据
. /u01/app/flash_recovery_area/ORA10G/archivelog/2011_07_17/o1_mf_1_67_%u_.arc
88. ORA-00280: change 9022403 for thread 1 is in sequence #67
89.
90. Specify log: {=suggested | filename | AUTO | CANCEL}
91. cancel
92. Media recovery cancelled.
四:恢复完后打开数据库,发现之前被truncate的表没有被成功恢复,这个时候就需要进行incarnation穿越
1. SQL> alter database open resetlogs;
2. Database altered.
3.
4. SQL> select * from t043_other;
5.
6. A
7. ----------
8. 1
9. 2
10. 3
11. 4
12.
13.
14. SQL> select * from t043_incarnation;
15. no rows selected
五:关闭数据库后将数据库启动在mount状态,利用rman进行incarnation穿越,恢复t043_incarnation表
1. SQL> shutdown immediate
2. Database closed.
3. Database dismounted.
4. ORACLE instance shut down.
5. SQL> startup mount
6. ORACLE instance started.
7.
8. Total System Global Area 629145600 bytes
9. Fixed Size 2022824 bytes
10. Variable Size 209715800 bytes
11. Database Buffers 411041792 bytes
12. Redo Buffers 6365184 bytes
13. Database mounted.
14.
15. [oracle@rhel6 ~]$ rman target /
16. Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jul 17 21:34:14 2011
17. Copyright (c) 1982, 2005, Oracle. All rights reserved.
18. connected to target database: ORA10G (DBID=4061806388)
19.
20. RMAN> list incarnation;
21.
22. using target database control file instead of recovery catalog
23.
24. List of Database Incarnations
25. DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
26. ------- ------- -------- ---------------- --- ---------- ----------
27. 1 1 ORA10G 4061806388 PARENT 1 2005-10-22-21:44:08
28. 2 2 ORA10G 4061806388 PARENT 525876 2011-02-12-18:37:43
29. 3 3 ORA10G 4061806388 PARENT 7781117 2011-05-23-13:24:09
30. 4 4 ORA10G 4061806388 PARENT 7787669 2011-05-23-15:51:11
31. 5 5 ORA10G 4061806388 CURRENT 9022404 2011-07-17-21:32:32
32.
33. RMAN> reset database to incarnation 4;
34. database reset to incarnation 4
35.
36. RMAN> list incarnation;
37. List of Database Incarnations
38. DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
39. ------- ------- -------- ---------------- --- ---------- ----------
40. 1 1 ORA10G 4061806388 PARENT 1 2005-10-22-21:44:08
41. 2 2 ORA10G 4061806388 PARENT 525876 2011-02-12-18:37:43
42. 3 3 ORA10G 4061806388 PARENT 7781117 2011-05-23-13:24:09
43. 4 4 ORA10G 4061806388 CURRENT 7787669 2011-05-23-15:51:11
44. 5 5 ORA10G 4061806388 ORPHAN 9022404 2011-07-17-21:32:32
45.
46.
47. RMAN> run {
48. 2> set until time '2011-07-17-21:22:30';
49. 3> restore database;
50. 4> recover database;
51. 5> }
52.
53. RMAN> alter database open resetlogs;
54. database opened
55.
56.
57. SQL> select * from t043_incarnation;
58.
59. A
60. ------------------------------------------------------------
61. corss successful
62.
63. SQL> select * from t043_other;
64.
65. A
66. ----------
67. 1
68. 2
总结:穿越incarnation后,将会产生孤儿incarnation(orphan),这个时候最好重新备份下数据库
本文出自 “月牙天冲” 博客


首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇oracle密码过期的处理办法 下一篇oracle临时表空间

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: