ORA-01207: file is more recent than control file – old control file

一个实例从A机冷备份到B机启动数据库报ORA-01207故障:

ALTER DATABASE OPEN
Errors in file /DBSoftware/app/oracle/diag/rdbms/orcl/orcl/t
race/orcl_ora_10048.trc:
ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA.ORA'
ORA-01207: file is more recent than control file - old control file
ORA-1122 signalled during: ALTER DATABASE OPEN...

造成这个原因是因为控制文件与数据文件不一致
控制文件是旧的。此时我们可以通过重建控制文件或者从旧的数据备份开始恢复。
恢复步骤如下:

SQL> alter database backup controlfile to trace;

Database altered.

SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/DBSoftware/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_10048.trc

然后从跟踪文件找到创建控制文件的语句

SQL> shutdown immeidate;
SP2-0717: illegal SHUTDOWN option
SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup pfile=/DBSoftware/app/oracle/product/10.2.0/db_1/
dbs/initorcl.ora nomount
ORACLE instance started.

Total System Global Area 4977278976 bytes
Fixed Size                  2235016 bytes
Variable Size            3657434488 bytes
Database Buffers         1308622848 bytes
Redo Buffers                8986624 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  NOARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 1168
  7  LOGFILE
  8    GROUP 1 '/DBSoftware/app/oracle/oradata/orcl/redo01.log'  SIZE 50M BLOCKSIZE 512,
  9    GROUP 2 '/DBSoftware/app/oracle/oradata/orcl/redo02.log'  SIZE 50M BLOCKSIZE 512,
 10    GROUP 3 '/DBSoftware/app/oracle/oradata/orcl/redo03.log'  SIZE 50M BLOCKSIZE 512
 11  -- STANDBY LOGFILE
 12  DATAFILE
 13    '/DBSoftware/app/oracle/oradata/orcl/system01.dbf',
 14    '/DBSoftware/app/oracle/oradata/orcl/sysaux01.dbf',
 15    '/DBSoftware/app/oracle/oradata/orcl/undotbs01.dbf',
 16    '/DBSoftware/app/oracle/oradata/orcl/users01.dbf',
 17    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA.ORA',
 18    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA01.ORA',
 19    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA02.ORA',
 20    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA03.ORA',
 21    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA04.ORA',
 22    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA05.ORA',
 23    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA06.ORA',
 24    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA07.ORA',
 25    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA08.ORA',
 26    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA09.ORA',
 27    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA10.ORA',
 28    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA11.ORA',
 29    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA12.ORA',
 30    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA13.ORA',
 31    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA14.ORA',
 32    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA15.ORA',
 33    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA16.ORA',
 34    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA17.ORA',
 35    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA18.ORA',
 36    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA19.ORA',
 37    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/E:DATAHYGEIA20.ORA',
 38    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDAVE.ORA',
 39    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_IAS_ORASDPM.ORA',
 40    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_AUG.ORA',
 41    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_EONEPRF_IDX.ORA',
 42    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_MAR.ORA',
 43    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_BRSADATA.ORA',
 44    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDM_ARCHIVE.ORA',
 45    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV_BIPLATFORM.ORA',
 46    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_IAS_ORASDPXDMS.ORA',
 47    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_ENTX_MP_IDX.ORA',
 48    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_NOV.ORA',
 49    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA.ORA',
 50    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_DEC.ORA',
 51    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_ORABAM.ORA',
 52    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_PS_LG_IDX.ORA',
 53    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_MON_IDX.ORA',
 54    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLHYGEIA_MM.ORA',
 55    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV_MDS.ORA',
 56    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_IAS_ORASDPSDS.ORA',
 57    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_ND_IDX.ORA',
 58    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_TX_DT_IDX.ORA',
 59    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_ENTONE_IDX.ORA',
 60    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_JUL.ORA',
 61    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLOLTS_SVRMGSTORE.ORA',
 62    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLOLTS_BATTRSTORE.ORA',
 63    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_MO_LG_IDX.ORA',
 64    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_PL_LG_IDX.ORA',
 65    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDM.ORA',
 66    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLOLTS_DEFAULT.ORA',
 67    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLOLTS_ATTRSTORE.ORA',
 68    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_QA_HT_DATA.ORA',
 69    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_JUN.ORA',
 70    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_IAS_ORASDPLS.ORA',
 71    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_US_ND_IDX.ORA',
 72    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_JAN.ORA',
 73    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_OCT.ORA',
 74    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_TX_LG_IDX.ORA',
 75    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_DATA_MAY.ORA',
 76    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_INDX.ORA',
 77    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_SOAINFRA.ORA',
 78    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_TBS_OAAM_ND_HS_IDX.ORA',
 79    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLDEV1_OAM.ORA',
 80    '/DBSoftware/app/oracle/product/10.2.0/db_1/dbs/
D:APPADMINISTRATORORADATAORCLOLTS_CT_STORE.ORA',
 81    '/DBSoftware/app/oracle/oradata/orcl/system02.dbf',
 82    '/DBSoftware/app/oracle/oradata/orcl/DEV1_portalidx.dbf',
 83    '/DBSoftware/app/oracle/oradata/orcl/DEV1_iasactivities.dbf',
 84    '/DBSoftware/app/oracle/oradata/orcl/DEV1_urmserver.dbf',
 85    '/DBSoftware/app/oracle/oradata/orcl/DEV1_iaswebcenter.dbf',
 86    '/DBSoftware/app/oracle/oradata/orcl/DEV1_odi_user.dbf',
 87    '/DBSoftware/app/oracle/oradata/orcl/DEV1_iasjive.dbf',
 88    '/DBSoftware/app/oracle/oradata/orcl/DEV1_ocs.dbf',
 89    '/DBSoftware/app/oracle/oradata/orcl/DEV1_social.dbf',
 90    '/DBSoftware/app/oracle/oradata/orcl/DEV1_biplatform.dbf',
 91    '/DBSoftware/app/oracle/oradata/orcl/DEV1_orairm.dbf',
 92    '/DBSoftware/app/oracle/oradata/orcl/DEV1_ipm.dbf',
 93    '/DBSoftware/app/oracle/oradata/orcl/DEV1_portaldoc.dbf',
 94    '/DBSoftware/app/oracle/oradata/orcl/DEV1_portallog.dbf',
 95    '/DBSoftware/app/oracle/oradata/orcl/DEV1_webcenter_portlet.dbf',
 96    '/DBSoftware/app/oracle/oradata/orcl/DEV1_discoptm5cache.dbf',
 97    '/DBSoftware/app/oracle/oradata/orcl/DEV1_portal.dbf',
 98    '/DBSoftware/app/oracle/oradata/orcl/DEV1_discopstore.dbf',
 99    '/DBSoftware/app/oracle/oradata/orcl/DEV1_ocssearch.dbf',
100    '/DBSoftware/app/oracle/oradata/orcl/DEV1_mds.dbf',
101    '/DBSoftware/app/oracle/oradata/orcl/DEV1_discoptm5meta.dbf'
102  CHARACTER SET ZHS16GBK
103  ;

Control file created.



SQL> alter database open;

Database altered.

SQL> create spfile from pfile;

File created.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 4977278976 bytes
Fixed Size                  2235016 bytes
Variable Size            3657434488 bytes
Database Buffers         1308622848 bytes
Redo Buffers                8986624 bytes
Database mounted.
Database opened.

再重建临时表空间

ALTER TABLESPACE TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/temp01.dbf' REUSE;
ALTER TABLESPACE DEV1_SOCIAL_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_socialtemp.dbf' REUSE;
ALTER TABLESPACE DEV1_ODI_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_odi_temp.dbf' REUSE;
ALTER TABLESPACE DEV1_IAS_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_iastemp.dbf' REUSE;
ALTER TABLESPACE DEV1_OCSSEARCH_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_ocssearchtemp.dbf' REUSE;
ALTER TABLESPACE DEV1_ORAIRM_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_orairmtemp.dbf' REUSE;
ALTER TABLESPACE DEV1_IPM_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_ipmtemp.dbf' REUSE;
ALTER TABLESPACE DEV1_OCS_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_ocstemp.dbf' REUSE;
ALTER TABLESPACE DEV1_URMSERVER_TEMP ADD TEMPFILE '/DBSoftware/app/oracle/oradata/orcl/DEV1_urmservertemp.dbf' REUSE;

发表评论

电子邮件地址不会被公开。