Bo's Oracle Station

查看: 2004|回复: 0

课程第31/32次(2016-12-28星期三,2016-12-30星期五)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-12-29 09:31:59 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2017-1-5 09:41 编辑

上完1Z0-053第2章(复习可恢复性)
(052共19章,053共21章,063多租户共9章,49-18)

如果CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS; 即24H
那么
1T备份做在2016-12-28   21:28:00
2T备份做在2016-12-29 00:14:00
如果现在是2016-12-30 00:14:00,那么1T就obsolete

结论1: obsolete算整整24H

如果在2016-12-30
23:59:59,执行report need backup;没有输出
如果在2016-12-31 00:00:00,执行report need backup;说所有数据文件都需要备份

结论2: report need  backup算24H+当天剩余时间

时间是2016-12-31 00:10:00
如果users表空间只读,并做3T备份
并且CONFIGURE BACKUP OPTIMIZATION ON;

时间到了2016-12-31 23:53:00
做4T备份,发现 users表空间被跳过不备份

最后时间到了2017-01-01 00:00:00
做5T备份,发现 users表空间有开始备份

结论3: 备份优化有效期算24H-
当天剩余时间


恢复目录操作:
  1. [oracle@station90 admin]$ rman target  /   catalog u90/oracle_4U@utforcl

  2. Recovery Manager: Release 11.2.0.1.0 - Production on Mon Jan 2 23:36:43 2017

  3. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: ORCL (DBID=1343950367)
  5. connected to recovery catalog database

  6. RMAN> register database ;

  7. database registered in recovery catalog
  8. starting full resync of recovery catalog
  9. full resync complete

  10. RMAN> unregister database ;

  11. database name is "ORCL" and DBID is 1343950367

  12. Do you really want to unregister the database (enter YES or NO)? YES
  13. database unregistered from the recovery catalog

  14. RMAN> drop catalog;

  15. recovery catalog owner is U90
  16. enter DROP CATALOG command again to confirm catalog removal

  17. RMAN> drop catalog;

  18. ORACLE error from recovery catalog database: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

  19. RMAN-00571: ===========================================================
  20. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  21. RMAN-00571: ===========================================================
  22. RMAN-06434: some errors occurred while removing recovery catalog

  23. RMAN> drop catalog;

  24. recovery catalog owner is U90
  25. enter DROP CATALOG command again to confirm catalog removal

  26. RMAN> drop catalog;

  27. recovery catalog dropped

  28. RMAN> create catalog;
复制代码

做过的实验:
Screenshot.png

恢复0级镜像拷贝的脚本(图形界面建议的脚本):
  1. run {
  2. allocate channel c1 device type disk;
  3. recover copy of database with tag 'ORA_OEM_LEVEL_0';
  4. backup incremental level 1 cumulative  copies=1 for recover of copy with tag 'ORA_OEM_LEVEL_0' database;
  5. release channel c1;
  6. allocate channel c1 type 'SBT_TAPE' format '%U' parms 'ENV=(OB_MEDIA_FAMILY=station90)';
  7. allocate channel c2 type 'SBT_TAPE' format '%U' parms 'ENV=(OB_MEDIA_FAMILY=station90)';
  8. backup archivelog all not backed up;
  9. }
  10. allocate channel for maintenance device type 'SBT_TAPE' parms 'ENV=(OB_MEDIA_FAMILY=station90)';
  11. delete noprompt obsolete redundancy 1 device type 'SBT_TAPE';
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-26 07:50 , Processed in 0.119999 second(s), 27 queries .

快速回复 返回顶部 返回列表