重建控制文件ORA-12720

重建过程出错:
ORA-01503: CREATE CONTROLFILE failed
ORA-12720: operation requires database is in EXCLUSIVE mode
解决办法是停掉一个实例orcl2,然后在orcl1上执行:
sqlplus /nolog
conn sys as sysdba
alter system set cluster_database=FALSE scope=spfile sid='*';
shutdown immediate
可以继续执行重建控制文件的脚本了。

 CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    MAXINSTANCES 32
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 (
    '+DATA/orcl/onlinelog/group_1.261.831032755',
    '+FRA/orcl/onlinelog/group_1.257.831032791'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 2 (
    '+DATA/orcl/onlinelog/group_2.262.831032881',
    '+FRA/orcl/onlinelog/group_2.258.831032901'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 3 (
    '+DATA/orcl/onlinelog/group_3.266.831034657',
    '+FRA/orcl/onlinelog/group_3.259.831034683'
  ) SIZE 50M BLOCKSIZE 512,
  GROUP 4 (
    '+DATA/orcl/onlinelog/group_4.267.831034769',
    '+FRA/orcl/onlinelog/group_4.260.831034799'
  ) SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '+DATA/orcl/datafile/system.256.831032007',
  '+DATA/orcl/datafile/sysaux.257.831032021',
  '+DATA/orcl/datafile/undotbs1.258.831032025',
  '+DATA/orcl/datafile/user01.dbf',
  '+DATA/orcl/datafile/example.264.831033075',
  '+DATA/orcl/datafile/undotbs2.265.831034283',
  '+DATA/orcl/datafile/sicca.270.835217381'
CHARACTER SET AL32UTF8
;

以上脚本是在所有归档日志和在线日志全部存在的情况下执行。控制文件能够从当前的日志文件获取准确的scn和时间点。同样也可以从数据文件中获取准确的scn。

posted @ 2013-12-31 11:28  孙愚  阅读(3657)  评论(0编辑  收藏  举报