Error Description
While creating cloning database I have modified controlfile contents as below where I like to change my database name to arjucl.
STARTUP NOMOUNT PFILE='F:\PFILE.ORA'
CREATE CONTROLFILE REUSE DATABASE "arjucl" RESETLOGS ARCHIVELOG
.
.
.
'F:\ORACLE\ARJUCL\SYSTEM01.DBF',
.
.
.
CHARACTER SET WE8MSWIN1252
;
Now I ran this script to create controlfile and it fails
SQL> @f:\controlfile.ctl
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size 1247516 bytes
Variable Size 71304932 bytes
Database Buffers 25165824 bytes
Redo Buffers 7139328 bytes
CREATE CONTROLFILE REUSE DATABASE "arjucl" NORESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01161: database name ARJU in file header does not match given name of
ARJUCL
ORA-01110: data file 1: 'F:\ORACLE\ARJUCL\SYSTEM01.DBF'
Cause of The Problem
Control file script has been changed, more specifically database name has been changed.
Solution of the Problem
To create the new controlfile for the new database you must use the word 'SET'
in the CREATE CONTROLFILE COMMAND. The SET DATABASE command is what enables the
changes to the name of the database. So the script will be like below
STARTUP NOMOUNT PFILE='F:\PFILE.ORA'
CREATE CONTROLFILE REUSE SET DATABASE "arjucl" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'F:\ORACLE\ARJUCL\REDO01.LOG' SIZE 50M,
GROUP 2 'F:\ORACLE\ARJUCL\REDO02.LOG' SIZE 50M,
GROUP 3 'F:\ORACLE\ARJUCL\REDO03.LOG' SIZE 50M
DATAFILE
'F:\ORACLE\ARJUCL\SYSTEM01.DBF',
'F:\ORACLE\ARJUCL\UNDOTBS01.DBF',
'F:\ORACLE\ARJUCL\SYSAUX01.DBF',
'F:\ORACLE\ARJUCL\USERS01.DBF',
'F:\ORACLE\ARJUCL\EXAMPLE01.DBF',
'F:\ORACLE\ARJUCL\TEST_TBS01.DBF'
CHARACTER SET WE8MSWIN1252
;
Now run this will successfully run,
SQL> @f:\controlfile.ctl
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size 1247516 bytes
Variable Size 71304932 bytes
Database Buffers 25165824 bytes
Redo Buffers 7139328 bytes
Control file created.
No comments:
Post a Comment