博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
利用备份的控制文件恢复
阅读量:7239 次
发布时间:2019-06-29

本文共 3539 字,大约阅读时间需要 11 分钟。

 

cp +DATA/ora11g/backup/control01.ctl +DATA/ora11g/controlfile/control01.ctl

alter system set control_files='+DATA/ora11g/controlfile/control01.ctl' scope=spfile;

shutdown immediate

startup mount

select group#,status from v$log;

select group#,member from v$logfile;

select group#,thread#,sequence# from v$archive;

recover database using backup controlfile until cancel;

alter database open resetlogs;

 

------------------------------------------------------------------------------------------------------------------------------------------------

示例

alter database backup controlfile to '+DATA/ora11g/backup/control01.ctl';

alter database backup controlfile to trace;

alter database backup controlfile to trace as ‘/u02/app/trace123.trc’;

 

[oracle@pc2 trace]$ pwd

/u02/app/diag/rdbms/ora11g/ora11g/trace

[oracle@pc2 trace]$ ls -tl  查看时间最近的trace文件(ora11g_ora_*.trc),其中有创建控制文件的全部命令

total 968

-rw-r----- 1 oracle asmadmin 20320 Dec 19 10:31 ora11g_mmon_3942.trc

-rw-r----- 1 oracle asmadmin  2198 Dec 19 10:31 ora11g_mmon_3942.trm

-rw-r----- 1 oracle asmadmin 48189 Dec 19 10:18 alert_ora11g.log

-rw-r----- 1 oracle asmadmin  6959 Dec 19 10:18 ora11g_ora_31212.trc

-rw-r----- 1 oracle asmadmin   194 Dec 19 10:18 ora11g_ora_31212.trm

 

SYS@ora11g>startup

ORACLE instance started.

Total System Global Area  830930944 bytes

Fixed Size                  2231048 bytes

Variable Size             629146872 bytes

Database Buffers          192937984 bytes

Redo Buffers                6615040 bytes

ORA-00205: error in identifying control file, check alert log for more info

 

cp +DATA/ora11g/backup/control01.ctl +DATA/ora11g/controlfile/control01.ctl

 

alter system set control_files='+DATA/ora11g/controlfile/control01.ctl' scope=spfile;

 

SYS@ora11g>alter database mount;

ERROR at line 1:

ORA-00205: error in identifying control file, check alert log for more info

 

SYS@ora11g>shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

 

SYS@ora11g>startup mount

ORACLE instance started.

Total System Global Area  830930944 bytes

Fixed Size                  2231048 bytes

Variable Size             629146872 bytes

Database Buffers          192937984 bytes

Redo Buffers                6615040 bytes

Database mounted.

 

SYS@ora11g>select group#,status from v$log;

    GROUP# STATUS

---------- ----------------

         1 INACTIVE

         3 INACTIVE

         2 CURRENT

 

SYS@ora11g>select group#,member from v$logfile;

    GROUP# MEMBER

---------- --------------------------------------------------

         3 +DATA/ora11g/onlinelog/group_3.266.833721683

         3 +DATA/ora11g/onlinelog/group_3.267.833721685

         2 +DATA/ora11g/onlinelog/group_2.264.833721681

         2 +DATA/ora11g/onlinelog/group_2.265.833721683

         1 +DATA/ora11g/onlinelog/group_1.262.833721677

         1 +DATA/ora11g/onlinelog/group_1.263.833721679

 

SYS@ora11g>select group#,thread#,sequence# from v$archive;

 

SYS@ora11g>recover database using backup controlfile until cancel;

ORA-00279: change 1104788 generated at 12/11/2013 13:27:34 needed for thread 1

ORA-00289: suggestion : +DATA

ORA-00280: change 1104788 for thread 1 is in sequence #8

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/ora11g/onlinelog/group_2.264.833721681

Log applied.

Media recovery complete.

 

SYS@ora11g>recover database using backup controlfile until cancel;

ORA-00279: change 1105381 generated at 12/19/2013 11:07:09 needed for thread 1

ORA-00289: suggestion : +DATA

ORA-00280: change 1105381 for thread 1 is in sequence #8

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

+DATA/ora11g/onlinelog/group_2.265.833721683

Log applied.

Media recovery complete.

 

SYS@ora11g>alter database open resetlogs;

Database altered.

转载于:https://www.cnblogs.com/wwxbi/p/4216749.html

你可能感兴趣的文章
(转)S5PV210 三个Camera Interface/CAMIF/FIMC的区别
查看>>
(转)x264重要结构体详细说明(1): x264_param_t
查看>>
struct和typedef struct
查看>>
9.5 在 C# 中使用 F# 库
查看>>
2016第6周六
查看>>
Windows 下 绿化 Oracle
查看>>
利用京东云擎架设免费Wordpress 博客(git方式)
查看>>
Linux开发环境搭建与使用——ubuntu更新设置
查看>>
POJ 3740 Dancing Links
查看>>
iOS开发--使用NSMutableAttributedString 实现富文本
查看>>
十一、jdk命令之Jstatd命令(Java Statistics Monitoring Daemon)
查看>>
iOS开发小技巧--TableView Group样式中控制每个section之间的距离
查看>>
18.OGNL与ValueStack(VS)-值栈入门
查看>>
Linux进程间通信-匿名管道
查看>>
servlet过滤器配置白名单、黑名单
查看>>
linux下cmake编译安装、配置和卸载mysql
查看>>
HDU2639Bone Collector II[01背包第k优值]
查看>>
股指期货与融资融券做空机制有什么区别?
查看>>
Linux之ls命令
查看>>
twisted的defer模式和线程池
查看>>