|
本帖最后由 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-当天剩余时间
恢复目录操作:
- [oracle@station90 admin]$ rman target / catalog u90/oracle_4U@utforcl
- Recovery Manager: Release 11.2.0.1.0 - Production on Mon Jan 2 23:36:43 2017
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- connected to recovery catalog database
- RMAN> register database ;
- database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN> unregister database ;
- database name is "ORCL" and DBID is 1343950367
- Do you really want to unregister the database (enter YES or NO)? YES
- database unregistered from the recovery catalog
- RMAN> drop catalog;
- recovery catalog owner is U90
- enter DROP CATALOG command again to confirm catalog removal
- RMAN> drop catalog;
- ORACLE error from recovery catalog database: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-06434: some errors occurred while removing recovery catalog
- RMAN> drop catalog;
- recovery catalog owner is U90
- enter DROP CATALOG command again to confirm catalog removal
- RMAN> drop catalog;
- recovery catalog dropped
- RMAN> create catalog;
复制代码
做过的实验:
恢复0级镜像拷贝的脚本(图形界面建议的脚本):
- run {
- allocate channel c1 device type disk;
- recover copy of database with tag 'ORA_OEM_LEVEL_0';
- backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA_OEM_LEVEL_0' database;
- release channel c1;
- allocate channel c1 type 'SBT_TAPE' format '%U' parms 'ENV=(OB_MEDIA_FAMILY=station90)';
- allocate channel c2 type 'SBT_TAPE' format '%U' parms 'ENV=(OB_MEDIA_FAMILY=station90)';
- backup archivelog all not backed up;
- }
- allocate channel for maintenance device type 'SBT_TAPE' parms 'ENV=(OB_MEDIA_FAMILY=station90)';
- delete noprompt obsolete redundancy 1 device type 'SBT_TAPE';
复制代码
|
|