[20171031]rman xxx Failure.txt
[20171031]rman xxx Failure.txt
--//简单测试 List Failure, Advise Failure and Repair Failure命令在11g下,也许以后工作需要.
--//虽然我自己很少使用这个命令,感觉这个有点傻瓜化.
1.环境:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name BOOK
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM *** /mnt/ramdisk/book/system01.dbf
2 940 SYSAUX *** /mnt/ramdisk/book/sysaux01.dbf
3 865 UNDOTBS1 *** /mnt/ramdisk/book/undotbs01.dbf
4 128 USERS *** /mnt/ramdisk/book/users01.dbf
5 346 EXAMPLE *** /mnt/ramdisk/book/example01.dbf
6 40 TEA *** /mnt/ramdisk/book/tea01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 414 TEMP 32767 /mnt/ramdisk/book/temp01.dbf
2.建立测试环境:
--//建立备份:
delete archivelog all;
backup database format '/home/oracle/backup/full_%U';
backup archivelog all format '/home/oracle/backup/archive_%U';
--//过程略.
3.关闭数据库,删除一个数据文件:
RMAN> shutdown immediate ;
database closed
database dismounted
Oracle instance shut down
$ mv /mnt/ramdisk/book/tea01.dbf /mnt/ramdisk/book/tea01.dbf_20171031
4.启动数据库:
SYS@book> startup
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/mnt/ramdisk/book/tea01.dbf'
SYS@book> select open_mode from v$database ;
OPEN_MODE
--------------------
MOUNTED
5.通过以下命令观察:
--//List Failure;
RMAN> List Failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
71648 HIGH OPEN 2017-10-31 15:48:51 One or more non-system datafiles are missing
RMAN> List Failure detail;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
71648 HIGH OPEN 2017-10-31 15:48:51 One or more non-system datafiles are missing
Impact: See impact for individual child failures
List of child failures for parent failure ID 71648
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
71651 HIGH OPEN 2017-10-31 15:48:51 Datafile 6: '/mnt/ramdisk/book/tea01.dbf' is missing
Impact: Some objects in tablespace TEA might be unavailable
RMAN> List Failure 71651;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
71651 HIGH OPEN 2017-10-31 15:48:51 Datafile 6: '/mnt/ramdisk/book/tea01.dbf' is missing
Impact: Some objects in tablespace TEA might be unavailable
--//Advise Failure
RMAN> Advise Failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
71648 HIGH OPEN 2017-10-31 15:48:51 One or more non-system datafiles are missing
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=41 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=54 device type=DISK
analyzing automatic repair options complete
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /mnt/ramdisk/book/tea01.dbf was unintentionally renamed or moved, restore it
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 6
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/book/book/hm/reco_4210181035.hm
$ cat /u01/app/oracle/diag/rdbms/book/book/hm/reco_4210181035.hm
# restore and recover datafile
restore datafile 6;
recover datafile 6;
sql 'alter database datafile 6 online';
--//可以发现修复脚本.再次执行Advise Failure ;还是在目录/u01/app/oracle/diag/rdbms/book/book/hm/生产不同的文件.
--//Repair Failure
RMAN> Repair Failure preview;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/book/book/hm/reco_3211653773.hm
contents of repair script:
# restore and recover datafile
restore datafile 6;
recover datafile 6;
sql 'alter database datafile 6 online';
RMAN> Repair Failure ;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/book/book/hm/reco_3211653773.hm
contents of repair script:
# restore and recover datafile
restore datafile 6;
recover datafile 6;
sql 'alter database datafile 6 online';
Do you really want to execute the above repair (enter YES or NO)? yes
executing repair script
Starting restore at 2017-10-31 15:55:10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /mnt/ramdisk/book/tea01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/full_gdsidcrr_1_1
channel ORA_DISK_1: piece handle=/home/oracle/backup/full_gdsidcrr_1_1 tag=TAG20171031T154706
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2017-10-31 15:55:12
Starting recover at 2017-10-31 15:55:12
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 2017-10-31 15:55:12
sql statement: alter database datafile 6 online
repair failure complete
Do you want to open the database (enter YES or NO)? YES
database opened
SYS@book> select open_mode from v$database ;
OPEN_MODE
--------------------
READ WRITE
--//OK现在数据库正常打开了.
[20171031]rman xxx Failure.txt的更多相关文章
- [20171206]rman与truncate2.txt
[20171206]rman与truncate2.txt --//上午测试发现truncate的表在做rman备份时还要做8个extents的备份.--//不知道自己的猜测是否正确,选择一个使用UNI ...
- [20171206]rman与truncate.txt
[20171206]rman与truncate.txt --//昨天下班在回家的路上,突然想起以前遇到的问题,就是truncate表后,rman做备份时会备份多少truncate表的信息,--//当时 ...
- [20171130]关于rman备份疑问.txt
[20171130]关于rman备份疑问.txt --//前面测试太乱,重新做一些rman as copy相关测试. 1.环境:SCOTT@book> @ &r/ver1PORT_STR ...
- [20190517]rman tape compressed.txt
[20190517]rman tape compressed.txt --//前一段测试rman选择压缩备份时,如果备份单个数据文件小于64M-3*8K时,先建立大小64M文件,最后会回收到自己的备份 ...
- [20171225]没有备份数据文件的恢复.txt
[20171225]没有备份数据文件的恢复.txt --//别人问的问题,增加了数据文件没有备份,如何恢复,实际上很简单,因为当前控制文件有记录建立时间只要从建立数据文件开始的--//归档日志都存在恢 ...
- 转 rman 恢复报错
###sample 1 原因是新库起了FRA 区,FRA 区的旧文件属于之前的归档日志文件产生,这样会导致无法识别的问题. 解决办法,清空FRA或者恢复时候不启用FRA. RMAN RESTORE ...
- 官方文档 恢复备份指南二 Getting Started with RMAN
本章对RMAN进行基本的熟悉和了解 1.Overview of the RMAN Environment RMAN运行时需要的最小环境: target database ...
- 使用rman恢复数据小结
恢复前提有数据备份 以 alter database open resetlogs 开机以后多要做一次全备(以前的备份失效了) 恢复参数文件: restore spfile from '/home/o ...
- RMAN详细教程(二):备份、检查、维护、恢复
RMAN详细教程(一):基本命令代码 一.创建增量备份 增量备份级别为0-4,但为方便备份管理,oracle建议只限于0级和1级. 1.差异增量备份(differential incremental ...
随机推荐
- 构建NTP时间服务器
NTP服务器是用于局域网服务器时间同步使用的,可以保证局域网所有的服务器与时间服务器的时间保持一致,某些应用对时间实时性要求高的必须统一时间. 互联网的时间服务器也有很多,例如ntpdate ntp. ...
- SpringBoot初探(上传文件)
学了Spring,SpringMVC,Mybatis这一套再来看SpringBoot,心里只有一句握草,好方便 这里对今天做的东西做个总结,然后在这之间先安利一个热部署的工具,叫spring-DevT ...
- odoo开发笔记 -- 传递上下文实现列表视图按照指定条件过滤显示
按钮传递上下文: <xpath expr="//div[@name='dec_work_sheet_id']" position="after"> ...
- asp.net core的docker实践
如果centos中没有安装和docker和.net core镜像,先安装docker和asp.net core 镜像 安装dockeryum -y install docker-io 启动 Docke ...
- SQL Server性能优化(14)索引碎片
一. 外部碎片和内部碎片的概念 碎片的概念和检测,参考MSDN:https://msdn.microsoft.com/zh-cn/library/ms189858.aspx 二.对于碎片的解决办法 解 ...
- MobaXterm不能读取C:\Windows\system32作为系统变量
OS环境:Win7 pro x64 已勾选:Settings-->Terminal-->勾选Use Windows PATH environment 然后在MobaXterm中查看系统变量 ...
- DevExpress GridControl小结
1. 如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 2. 如何新增一条记录 (1).gridView.Ad ...
- 从零开始学 Web 之 jQuery(七)事件冒泡,事件参数对象,链式编程原理
大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...
- 安装clickhouse缺少依赖libicudata.so.50()(64bit)
root@localhost ]# rpm -ivh clickhouse-common--.el7.x86_64.rpm 错误:依赖检测失败: libicudata.so.()(64bit) 被 c ...
- Windows版本redis高可用方案探究
目录 Windows版本redis高可用方案探究 前言 搭建redis主从 配置主redis-28380 配置从redis-23381 配置从redis-23382 将redis部署为服务 启动red ...