RMAN备份之丢失数据文件及控制文件的恢复

时间:2021-09-18 00:48:28

About Recovery with a Backup Control File
If all copies of the current control file are lost or damaged, then you must restore and mount a backup control file. You must then run the RECOVER command, even if no data files have been restored, and open the database with the RESETLOGS option. If some copies of the current control file are usable, however, then you can follow the procedure in "Responding to the Loss of a Subset of the Current Control Files" and avoid the recovery and RESETLOGS operation. When RMAN is connected to a recovery catalog, the recovery procedure with a backup control file is identical to recovery with a current control file. The RMAN metadata missing from the backup control file is available from the recovery catalog. The only exception is if the database name is not unique in the catalog, in which case you must use SET DBID command before restoring the control file.
1. Start RMAN and connect to a target database.
2. Start the target instance without mounting the database. RMAN>STARTUP NOMOUNT;  --控制文件丢失或损坏,只能将启动到nomount
3. Restore the control file
RMAN> SET DBID 320066378; # (Optional) If the database name is not unique, you need to specify the DBID
RMAN> RUN
{
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'autobackup_format';  
RESTORE CONTROLFILE FROM AUTOBACKUP;  --从自动备份中恢复控制文件
}
4. Start the target instance with mounting the database. RMAN>STARTUP MOUNT;  --控制文件已恢复,可mount数据文件

5. Restore the data files; RMAN>RESTORE DATABASE;  --restore/recover损坏的数据文件
6. Recover the database; RMAN>RECOVER DATABASE;
7. Open the database with RESETLOGS option; RMAN> ALTER DATABASE OPEN RESETLOGS; --以resetlog方式打开数据库

RMAN备份之丢失数据文件及控制文件的恢复的更多相关文章

  1. 批量迁移Oracle数据文件,日志文件及控制文件

    有些时候需要将Oracle的多个数据文件以及日志文件重定位或者迁移到新的分区或新的位置,比如磁盘空间不足,或因为特殊需求.对于这种情形可以采取批量迁移的方式将多个数据文件或者日志文件实现一次性迁移.当 ...

  2. ORACLE体系结构一 (物理结构)- 数据文件、日志文件、控制文件和参数文件

    一.物理结构Oracle物理结构包含了数据文件.日志文件.控制文件和参数文件 1.数据文件每一个ORACLE数据库有一个或多个物理的数据文件(data file).一个数据库的数据文件包含全部数据库数 ...

  3. RMAN数据库恢复之丢失数据文件的恢复

    删除某一数据文件:SQL> HOST del D:\app\Administrator\oradata\orcl\USERS01.dbf 启动数据库,提示丢失数据文件4,此时数据库处理MOUNT ...

  4. oracle数据库丢失数据文件、控制文件、重做日志文件、初始化文件恢复方法

    rman  target/ list backup; 查看是否已备份,如果没有,那就不知道了 模拟故障,删除/u01/app/oracle/oradata/ORCL文件夹下的所有文件 sqlplus ...

  5. 【Oracle】非RMAN恢复数据文件、控制文件

    实验环境:OEL 5.6 oracle 11g(11.2.0.4.0) 注意: system表空间数据文件不能在线recover,需要启动到mount状态再recover: undo表空间数据文件可以 ...

  6. RMAN备份与恢复之参数文件与控制文件

    0   说明 本例是基于备份数据库全库的基础上,还原参数据文件(spfile),控制文件. 1   准备 [oracle@TEST144239 /]$ sqlplus /nolog SQL Produ ...

  7. oracle之 利用 controlfile trace文件重建控制文件

    一. 11g RAC 重建控制文件 1. --"create controlfile"命令生成到追踪文件中:alter database backup controlfile to ...

  8. 【Oracle】利用trace文件重建控制文件

    重建步骤: 1.生成trace文件: alter database backup controlfile to trace; 2.找到生成的trace文件: show parameter dump u ...

  9. 【RMAN】Oracle中如何备份控制文件?备份控制文件的方式有哪几种?

    真题1. 如何备份控制文件?备份控制文件的方式有哪几种? 答案:备份控制文件的方式有多种. ① 备份控制文件可以在线进行: SQL> ALTER DATABASE BACKUP CONTROLF ...

随机推荐

  1. 解构C#游戏框架uFrame兼谈游戏架构设计

    1.概览 uFrame是提供给Unity3D开发者使用的一个框架插件,它本身模仿了MVVM这种架构模式(事实上并不包含Model部分,且多出了Controller部分).因为用于Unity3D,所以它 ...

  2. 配置SQL server远程连接(局域网)

    具体步骤: 1) 2) 3) 4) 5) 6) 7) 最后为了防火墙有影响,直接把防火关了,测试连接通过在来设置防火墙.

  3. 9、FTP封杀用户、限制传输速率、限制访问目录、为匿名用户提供下载资源

    一.封杀某些用户访问FTP服务器 例如  封杀 yanji [root@localhost root]#   vi   /etc/vsftpd.ftpusers     (用户控制配置文件,主要用于限 ...

  4. Android --#字XO小游戏

    Layout <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:andro ...

  5. AutoGenSystem

    #coding=utf-8 # # AutoGenSystem # 声明: # 该软件主要是为了解决Android系统更新时,由于版本很多,管理起来复杂,容易出错,于是采用软件 # 自动对系统软件进行 ...

  6. 网页icon和文本对齐神技 2016&period;03&period;23

    一直以来icon和文本需要对齐都使用vertical-align: middle;的方法,但兼容性不理想.参考了鑫旭大大的博客,终于收获不用vertical-align可以对齐的神技,原博点这里. 代 ...

  7. tribonacci

    Everybody knows Fibonacci numbers, now we are talking about the Tribonacci numbers: T[0] = T[1] = T[ ...

  8. Suse发生了错误Access denied for user &amp&semi;&num;39&semi;&amp&semi;&num;39&semi;&commat;&amp&semi;&num;39&semi;localhost&amp&semi;&num;39&semi; to&amp&semi;amp&semi;

    好久没实用MySQL了,上次由于装了Banq的论坛系统.在用MySQL Administrator进去的时候居然提示mysql error number 1045 access denied for ...

  9. arm-none-eabi-gcc编译报错:exit&period;c&colon;&lpar;&period;text&period;exit&plus;0x16&rpar;&colon; undefined reference to &grave;&lowbar;exit&&num;39&semi;

    该问题的出现是链接文件导致的,是不同的gcc交叉编译器支持的链接文件不同造成的,有几种方法可以解决这个问题. 方法一:更换arm-none-eabi-gcc的版本,这个一般是新的gcc编译器才会抱着错 ...

  10. python文件管理

    文件没有修改操作,修改的方式为打开文件--读取文件--内存中编辑文件--将内容写入文件 打开文件方式 with open('a.txt','w') as f: #操作系统自动关闭文件 f.write( ...