暂无图片
暂无图片
2
暂无图片
暂无图片
暂无图片
参数、控制、数据、日志文件全部丢失时的RMAN恢复
749
5页
6次
2019-10-16
5墨值下载
--
实验内容,在
rman
备份完整的情况下人为删除参数文件、控制
文件、数据文件及
rudo
,用
rman
进行修复
--
首先检查
RMAN
备份是否成功
--
显示数据文件
SQL>select name from v$datafile;
--
通过
pfile
文件生成
spfile
SQL>create pfile from spfile;
--
查看
spfile
(参数文件)文件位置
SQL>show parameter spfile;
----
查看控制文件位置
SQL> show parameter control_files;
--
删除所有数据文件,控制文件及
redo
[oracle@xforacle xfdb]$ rm -rf *
--
删除所有参数文件
[oracle@xforacle dbs]$ rm -rf *.ora
-------------
下面用
RMAN
进行数据恢
--------------
--
关闭数据库
SQL>shutdown abort
ORACLE instance shut down.
--
登入
RMAN
[oracle@xforacle dbs]$ rman target/
--
在参数文件损坏的情况下
, sqlplus
命令不能够将数据库开启到
nomount
状态
--
但是
RMAN
命令可以
.RMAN
命令会生成一个临时参数文件
,
以帮助数据库开到
nomount,
需要我们使用备份恢复参数文件
,
恢复后
,
记得重启数据库
---------
缺少参数文件数据库开启到
nomount
失败
SQL>startup nomount
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
'/u01/app/oracle/product/11.2.0/db_1/dbs/initxfdb.ora'
---rman
会临时生成一个参数文件 把数据库开启到
nomount
阶段
RMAN>startup nomount
startup failed: ORA-01078: failure in processing system
parameters
LRM-00109: could not open parameter file
'/u01/app/oracle/product/11.2/db_1/dbs/initxfdb.ora'
starting Oracle instance without parameter file for retrieval of
spfile
Oracle instance started
Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 281019272 bytes
Database Buffers 780140544 bytes
Redo Buffers 5517312 bytes
---------
通过备份恢复参数文件的命令
----------
RMAN> restore spfile from '
参数文件的备份路径
';
RMAN>restore spfile from
'/home/oracle/bak/spfile_XFDB_2su2o248_1_1p';
Starting restore at 29-MAY-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=171 device type=DISK
channel ORA_DISK_1: restoring spfile from AUTOBACKUP
/home/oracle/bak/spfile_XFDB_2su2o248_1_1p
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 29-MAY-19
------------
恢复的控制文件和现环境是不一致的
,
所有我们要关闭从起
-----------
--
关闭数据库
RMAN>shutdown abort
Oracle instance shut down
--
重启数据库到
nomount
阶段
RMAN>startup nomount
connected to target database (not started)
Oracle instance started
of 5
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜