Recreating controlfile fails with ORA-01503, ORA-01504

I recreated my controlfile and whenever I run it fails with ORA-01503, ORA-01504.
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 "shaikcl" NORESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'shaikcl' does not match parameter db_name 'shaikcl'

Cause of the problem
The error message already shown the database name in controlfile does not match with db_name parameter inside spfile/pfile.

Solution of the Problem
Be sure what would be your database name. In this example with message 'shaikcl' does not match parameter db_name 'shaikcl'
I see in controlfile the database name is specified shaikcl but in the spfile/file it is specified as shaikcl. If you are sure there is wrong entry inside spfile/pfile then you have to edit the db_name parameter in the spfile/pfile.
-If you have pfile then open it with text editor and edit db_name initialization parameter.
-If you have default spfile then use ALTER SYSTEM SET DB_NAME=real_name scope=spfile
and restart your database.

If you are sure that your spfile/pfile db_name parameter is correct and there is wrong setting on controlfile then edit the control file text script. Change database wrong_database_name to database right_database_name in the script.

Comments

Popular posts from this blog

ORA-04062: timestamp of procedure has been changed

ORA-00939: too many arguments -when case arguments exceed 255

ORA-31655: no data or metadata objects selected for job