CREATE CONTROLFILE REUSE DATABASE "ZA2" RESETLOGS force logging noARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 1
LOGFILE
GROUP 1 'E:\app\gurjeet\oradata\ZA2\REDO01.LOG' SIZE 50M,
GROUP 2 'E:\app\gurjeet\oradata\ZA2\REDO02.LOG' SIZE 50M,
GROUP 3 'E:\app\gurjeet\oradata\ZA2\REDO03.LOG' SIZE 50M
DATAFILE
'E:\app\gurjeet\oradata\ZA2\SYSTEM01.DBF',
'E:\app\gurjeet\oradata\ZA2\SYSAUX01.DBF',
'E:\app\gurjeet\oradata\ZA2\UNDOTBS01.DBF',
'E:\app\gurjeet\oradata\ZA2\USERS01.DBF'
CHARACTER SET AL32UTF8
SQL> /
CREATE CONTROLFILE REUSE DATABASE "ZA2" RESETLOGS force logging
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01161: database name ZA1 in file header does not match given name of ZA2
ORA-01110: data file 1: 'E:\app\gurjeet\oradata\ZA2\SYSTEM01.DBF'
When it can occur:
1. when we try to create control file while creating new database using old database datafiles and logfiles.
2. Create new control file when old control file is corrupt or lost.
Problem:-
1. It can be because of the db name in "CREATE CONTROLFILE REUSE DATABASE "ZA2" " ie ZA2 is not match with the db name store in datafile and log files.
Solution:-
1. Use appropriate database name in create control file statement.
2. If you want to change the database name (want to clone the database) use "SET" instead of "REUSE" in create control file script.
i.e. CREATE CONTROLFILE SET DATABASE "ZA2"
-from oracle docs
SET DATABASE Clause
Use SET DATABASE to change the name of the database. The name of a database can be as long as eight bytes.
No comments:
Post a Comment