首页 > 数据库 > Oracle > 重构控制文件遭遇的错误
SQL>alter database backup controlfile to trace as '/backup/cc';
vi cc
you find where start as
START NOMOUNT
then copy them to create.sql:
CREATE CONTROLFILE REUSE DATABASE "TEST" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 (
'/oracle/oradata/TEST/onlinelog/o1_mf_1_65ppqt6d_.log',
'/oracle/flash_recovery_area/TEST/onlinelog/o1_mf_1_65ppr0pf_.log'
) SIZE 50M,
GROUP 2 (
'/oracle/oradata/TEST/onlinelog/o1_mf_2_65ppr78b_.log',
'/oracle/flash_recovery_area/TEST/onlinelog/o1_mf_2_65pprfs9_.log'
) SIZE 50M,
GROUP 3 (
'/oracle/oradata/TEST/onlinelog/o1_mf_3_65pprn9c_.log',
'/oracle/flash_recovery_area/TEST/onlinelog/o1_mf_3_65pprtv8_.log'
) SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/oracle/oradata/TEST/datafile/o1_mf_system_65pplnyl_.dbf',
'/oracle/oradata/TEST/datafile/o1_mf_undotbs1_65pplodw_.dbf',
'/oracle/oradata/TEST/datafile/o1_mf_sysaux_65pplo06_.dbf',
'/oracle/oradata/TEST/datafile/o1_mf_users_65pplohf_.dbf',
'/oracle/oradata/TEST/datafile/o1_mf_example_65pptbpx_.dbf'
CHARACTER SET WE8ISO8859P1
;
ORA-01503: CREATE CONTROLFILE failed
ORA-01276: Cannot add file /oracle/oradata/TEST/controlfile/current.1079.695833241.
File has an Oracle Managed Files file name.
==================================================================================
http://www.asktom.cz/?m=200908&paged=2
ora-01276
ora-01503
Reason:
If you rename the omf datafile using a file-naming convention that does not follow the OMF naming convention, that file will no longer be an OMF. You cannot rename any existing non-OMF Oracle datafile to a filename that matches the OMF file format. Attempting to RENAME OMF files at the mount stage will fail in 9.0.1.2 onwards with:
Solution:
rename control file in init.ora
*.control_files=’/oracle/oradata/TEST/controlfile/current1.ctl’,'/oracle/oradata/TEST/controlfile/current2.ctl’
==================================
then vi init.ora
rename control file in there.
sql > @create
contrelfile created
sql > alter database open;
succefully
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24487368/viewspace-1037645/ ,如需转载,请注明出处,否则将追究法律责任。