sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

案例:Oracle 12C报错ORA-00205 重建控制文件control file

时间:2016-06-17 13:34   来源:Oracle研究中心   作者:惜分飞   点击:

天萃荷净 ORACLE 12C 控制文件异常恢复数据库

在oracle 12c引进了pdb的概念,但重建控制文件的过程还是完全和no-cdb(以前版本ORACLE)相同
数据库启动异常

idle> startup
ORACLE instance started.

Total System Global Area  521936896 bytes
Fixed Size                  2404552 bytes
Variable Size             205524792 bytes
Database Buffers          306184192 bytes
Redo Buffers                7823360 bytes
ORA-00205: error in identifying control file, check alert log for more info


idle> select * from v$version;

BANNER                                                                               CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0
PL/SQL Release 12.1.0.1.0 - Production                                                    0
CORE    12.1.0.1.0      Production                                                        0
TNS for 64-bit Windows: Version 12.1.0.1.0 - Production                                   0
NLSRTL Version 12.1.0.1.0 - Production                                                    0

2.alert日志信息

Wed Mar 19 20:30:20 2014
ALTER DATABASE   MOUNT
Wed Mar 19 20:30:20 2014
ORA-00210: ???????????
ORA-00202: ????: ''E:\APP\oracleplus\ORADATA\CDB\CONTROL01.CTL''
ORA-27048: skgfifi: ????????
OSD-04001: 逻辑块大小无效
ORA-205 signalled during: ALTER DATABASE   MOUNT...

利用strings命令找出来数据文件和联机日志路径

E:\APP\oracleplus\ORADATA\CDB\REDO04.LOG
E:\APP\oracleplus\ORADATA\CDB\REDO06.LOG
E:\APP\oracleplus\ORADATA\CDB\REDO05.LOG
E:\APP\oracleplus\ORADATA\CDB\PDB\PDB_USERS01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDB\SYSAUX01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDB\SYSTEM01.DBF
E:\APP\oracleplus\ORADATA\CDB\USERS01.DBF
E:\APP\oracleplus\ORADATA\CDB\UNDOTBS01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDBSEED\SYSAUX01.DBF
E:\APP\oracleplus\ORADATA\CDB\SYSAUX01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDBSEED\SYSTEM01.DBF
E:\APP\oracleplus\ORADATA\CDB\SYSTEM01.DBF
E:\APP\oracleplus\ORADATA\CDB\TEMP01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDB\TEMP01.DBF

如果有完整的alert日志也可以通过alert日志来分析数据文件路径和redo路径;
通过alert日志分析数据库编码,如果没有alert日志通过分析prop$分析编码;
redo group 可以在alert日志中查看,写入错误,在创建时候会提示正确值;
redo size 可以查看redo file,也可以先写入错误值,创建时候会提示正确block数量

3.重建控制文件

idle> CREATE CONTROLFILE REUSE DATABASE "CDB" NORESETLOGS FORCE LOGGING ARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 2921
  7  LOGFILE
  8  GROUP 4 'E:\APP\oracleplus\ORADATA\CDB\REDO04.LOG' size 50M,
  9  GROUP 6 'E:\APP\oracleplus\ORADATA\CDB\REDO06.LOG'  size 50M,
 10  GROUP 5 'E:\APP\oracleplus\ORADATA\CDB\REDO05.LOG'  size 50M
 11  DATAFILE
 12  'E:\APP\oracleplus\ORADATA\CDB\PDB\PDB_USERS01.DBF',
 13  'E:\APP\oracleplus\ORADATA\CDB\PDB\SYSAUX01.DBF',
 14  'E:\APP\oracleplus\ORADATA\CDB\PDB\SYSTEM01.DBF',
 15  'E:\APP\oracleplus\ORADATA\CDB\UNDOTBS01.DBF',
 16  'E:\APP\oracleplus\ORADATA\CDB\PDBSEED\SYSAUX01.DBF',
 17  'E:\APP\oracleplus\ORADATA\CDB\SYSAUX01.DBF',
 18  'E:\APP\oracleplus\ORADATA\CDB\PDBSEED\SYSTEM01.DBF',
 19  'E:\APP\oracleplus\ORADATA\CDB\SYSTEM01.DBF',
 20  'E:\APP\oracleplus\ORADATA\CDB\USERS01.DBF'
 21  CHARACTER SET ZHS16GBK
 22  ;

控制文件已创建。

idle> recover database;
完成介质恢复。
idle> alter database open;

数据库已更改。

idle> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            MOUNTED
idle> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
E:\APP\oracleplus\ORADATA\CDB\SYSTEM01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDBSEED\SYSTEM01.DBF
E:\APP\oracleplus\ORADATA\CDB\SYSAUX01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDBSEED\SYSAUX01.DBF
E:\APP\oracleplus\ORADATA\CDB\USERS01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDB\SYSTEM01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDB\SYSAUX01.DBF
E:\APP\oracleplus\ORADATA\CDB\PDB\PDB_USERS01.DBF
E:\APP\oracleplus\ORADATA\CDB\UNDOTBS01.DBF

已选择 9 行。

CDB_CDB$ROOT@SYS> alter session set container=pdb;

Session altered.

CDB_CDB$ROOT@SYS> alter database open;

Database altered.

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之案例:Oracle 12C报错ORA-00205 重建控制文件control file

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/414.html

Oracle研究中心

关键词:

Oracle 12C

ORA-00205错误

重建控制文件control file

ORA-00205