重建控制文件的操作

[[email protected] trace]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 15 17:01:14 2017

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

SQL>

SQL>

SQL> select name from v$controlfile ;

NAME

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

/u01/app/oracle/oradata/PROD1/control01.ctl

/u01/app/oracle/fast_recovery_area/PROD1/control02.ctl

SQL>

SQL>

SQL> ho rm /u01/app/oracle/oradata/PROD1/control01.ctl

SQL> ho rm /u01/app/oracle/fast_recovery_area/PROD1/control02.ctl

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 472887296 bytes

Fixed Size 1345716 bytes

Variable Size 419432268 bytes

Database Buffers 46137344 bytes

Redo Buffers 5971968 bytes

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

SQL> CREATE CONTROLFILE REUSE DATABASE "PROD1" RESETLOGS FORCE LOGGING ARCHIVELOG

2 MAXLOGFILES 16

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 100

5 MAXINSTANCES 8

6 MAXLOGHISTORY 292

7 LOGFILE

8 GROUP 1 ‘/u01/app/oracle/oradata/PROD1/redo01.log‘ SIZE 50M BLOCKSIZE 512,

9 GROUP 2 ‘/u01/app/oracle/oradata/PROD1/redo02.log‘ SIZE 50M BLOCKSIZE 512,

10 GROUP 3 ‘/u01/app/oracle/oradata/PROD1/redo03.log‘ SIZE 50M BLOCKSIZE 512

11 -- STANDBY LOGFILE

12 DATAFILE

13 ‘/u01/app/oracle/oradata/PROD1/system01.dbf‘,

14 ‘/u01/app/oracle/oradata/PROD1/sysaux01.dbf‘,

15 ‘/u01/app/oracle/oradata/PROD1/undotbs01.dbf‘,

16 ‘/u01/app/oracle/oradata/PROD1/users01.dbf‘,

17 ‘/u01/app/oracle/oradata/PROD1/example01.dbf‘,

18 ‘/u01/app/oracle/oradata/PROD1/undo01.dbf‘,

19 ‘/u01/practice/undotsb3.dbf‘

20 CHARACTER SET WE8MSWIN1252;

Control file created.

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: ‘/u01/app/oracle/oradata/PROD1/system01.dbf‘

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 4833502 generated at 09/15/2017 15:19:37 needed for thread 1

ORA-00289: suggestion :

/u01/app/oracle/fast_recovery_area/PROD1/archivelog/2017_09_15/o1_mf_1_3_%u_.arc

ORA-00280: change 4833502 for thread 1 is in sequence #3

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

auto

ORA-00308: cannot open archived log

‘/u01/app/oracle/fast_recovery_area/PROD1/archivelog/2017_09_15/o1_mf_1_3_%u_.ar

c‘

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

ORA-00308: cannot open archived log

‘/u01/app/oracle/fast_recovery_area/PROD1/archivelog/2017_09_15/o1_mf_1_3_%u_.ar

c‘

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: ‘/u01/app/oracle/oradata/PROD1/system01.dbf‘

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 4833502 generated at 09/15/2017 15:19:37 needed for thread 1

ORA-00289: suggestion :

/u01/app/oracle/fast_recovery_area/PROD1/archivelog/2017_09_15/o1_mf_1_3_%u_.arc

ORA-00280: change 4833502 for thread 1 is in sequence #3

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

/u01/app/oracle/oradata/PROD1/redo01.log

ORA-00310: archived log contains sequence 1; sequence 3 required

ORA-00334: archived log: ‘/u01/app/oracle/oradata/PROD1/redo01.log‘

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: ‘/u01/app/oracle/oradata/PROD1/system01.dbf‘

SQL> /u01/app/oracle/oradata/PROD1/redo01.log

SP2-0734: unknown command beginning "/u01/app/o..." - rest of line ignored.

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 4833502 generated at 09/15/2017 15:19:37 needed for thread 1

ORA-00289: suggestion :

/u01/app/oracle/fast_recovery_area/PROD1/archivelog/2017_09_15/o1_mf_1_3_%u_.arc

ORA-00280: change 4833502 for thread 1 is in sequence #3

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

/u01/app/oracle/oradata/PROD1/redo02.log

ORA-00310: archived log contains sequence 2; sequence 3 required

ORA-00334: archived log: ‘/u01/app/oracle/oradata/PROD1/redo02.log‘

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: ‘/u01/app/oracle/oradata/PROD1/system01.dbf‘

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 4833502 generated at 09/15/2017 15:19:37 needed for thread 1

ORA-00289: suggestion :

/u01/app/oracle/fast_recovery_area/PROD1/archivelog/2017_09_15/o1_mf_1_3_%u_.arc

ORA-00280: change 4833502 for thread 1 is in sequence #3

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

/u01/app/oracle/oradata/PROD1/redo03.log

Log applied.

Media recovery complete.

SQL>

SQL>

SQL>

SQL> alter database open resetlogs;

Database altered.

时间: 2024-11-10 11:37:35

重建控制文件的操作的相关文章

【翻译自mos文章】在重建控制文件之前应该考虑的事情

在重建控制文件之前应该考虑的事情 来源于: Things to Consider Before Recreating the Controlfile (文档 ID 1475632.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. 目的: 突出控制文件的重要性和在重建控制文件之前应该考虑的问题.

重建控制文件详解

http://note.youdao.com/share/?id=d3991566cad33723db8b92183dcd9161&type=note 完整图文最新版 创造"重建控制文件脚本"需要在mount或open下进行. alter database backup controlfile to trace as '/tmp/ctl..sql'; 执行"重建控制文件脚本"需要在nomount的时候. -- The following are curren

ORACLE之重建控制文件

这里上传图片一直失败,想要查看详细信息和截图的可以下载附件 首先看一下控制文件的理解: 控制文件是一个二进制文件,用于记录数据库的物理结构.一个控制文件只属于一个数据库.创建数据库时,创建控制文件.当数据库的物理结构改变的时候,Oracle会更新控制文件,不能手动修改内容. 控制文件内容有:数据库名.数据库创建的时间戳.数据文件的名字和位置.redo log (联机重做日志文件)的名字和位置.表空间信息.当前日志的序列号.checkpoint 信息.最新的 RMAN备份信息.归档日志信息 当这些

【翻译自mos文章】在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information)

在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information) 参考原文: Missed Database Supplemental Log Information After Recreate Controlfile In 10g Database. (Doc ID 1474952.1) 适用于: Oracle Server - Enterprise Edition - Version 10.1.0.2 and late

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

一. 11g RAC 重建控制文件 1. --"create controlfile"命令生成到追踪文件中:alter database backup controlfile to trace; 2. --确认追踪文件的路径:SQL> select value from v$diag_info where name='Default Trace File'; 3. -- 截取脚本 在追踪文件中找到并执行NORESETLOGS版本的"create controlfile&

丢失全部控制文件,noresetlogs重建控制文件,alter database open

測试2: (1)一致性的全备 SQL> shutdown immediate; $ cp -rf $ORACLE_BASE/oradata/boss/*.dbf /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.log /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.ctl /oradata/bossbak/

丢失所有控制文件,noresetlogs重建控制文件,alter database open

测试2: (1)一致性的全备 SQL> shutdown immediate; $ cp -rf $ORACLE_BASE/oradata/boss/*.dbf /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.log /oradata/bossbak/20140610allbackup $ cp -rf $ORACLE_BASE/oradata/boss/*.ctl /oradata/bossbak/

重建控制文件报错

SQL> CREATE CONTROLFILE REUSE DATABASE "EMREP" NORESETLOGS FORCE LOGGING ARCHIVELOG  2      MAXLOGFILES 16  3      MAXLOGMEMBERS 3  4      MAXDATAFILES 100  5      MAXINSTANCES 8  6      MAXLOGHISTORY 292  7  LOGFILE  8    GROUP 1 '/u01/app/o

【翻译自mos中文文章】重建控制文件的方法

重建控制文件的方法 參考原文: How to Recreate a Controlfile (Doc ID 735106.1) 适用于: Oracle Database - Enterprise Edition - Version 9.0.1.0 and later Information in this document applies to any platform. 解决方式: 警告: 仅仅有遇到下列场景时,你才应该recreate 你的控制文件 1.全部的当前的控制文件copies 已经