How to recreate control file [message #235087] |
Fri, 04 May 2007 01:03 |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
Hi,
I tried to clone the database,for that I copied all the datafiles,
redo log files,control files from database DB1 to database DB2.
When I try to recreate the controlfile of DB2 using,
CREATE CONTROLFILE SET DATABASE "DB2" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 254
MAXINSTANCES 8
MAXLOGHISTORY 16336
LOGFILE
GROUP 1('/oradata/admin/redo01a.log',
'/oradata/admin/redo01b.log') SIZE 10M,
GROUP 2('/oradata/admin/redo02a.log',
'/oradata/admin/redo02b.log') SIZE 10M
DATAFILE
'/oradata/data/system01.dbf',
'/oradata/data/undotbs01.dbf',
'/oradata/data/data01.dbf',
'/oradata/data/data02.dbf'
CHARACTER SET US7ASCII
;
it gave the following error,
CREATE CONTROLFILE SET DATABASE "DB2" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: '/oradata/admin/control1.ctl'
ORA-27038: skgfrcre: file exists
I tried to recreate the controlfile using REUSE option,
CREATE CONTROLFILE REUSE DATABASE "DB2" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 254
MAXINSTANCES 8
MAXLOGHISTORY 16336
LOGFILE
GROUP 1('/oradata/admin/redo01a.log',
'/oradata/admin/redo01b.log') SIZE 10M,
GROUP 2('/oradata/admin/redo02a.log',
'/oradata/admin/redo02b.log') SIZE 10M
DATAFILE
'/oradata/data/system01.dbf',
'/oradata/data/undotbs01.dbf',
'/oradata/data/data01.dbf',
'/oradata/data/data02.dbf'
CHARACTER SET US7ASCII
;
but it results in the following error,
CREATE CONTROLFILE REUSE DATABASE "DB2" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01161: database name DB1 in file header does not match given name of DB2
ORA-01110: data file 1: '/oradata/data/system01.dbf'
How to resolve this error to recreate the controlfile successfully?
Thanks...
[Updated on: Fri, 04 May 2007 01:18] Report message to a moderator
|
|
|
|
Re: How to recreate control file [message #235091 is a reply to message #235087] |
Fri, 04 May 2007 01:16 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Self explanative.
>>ORA-27038: skgfrcre: file exists
You are trying to create new control. Oracle finds one already in the said location(identified by control_files in your initsid.ora). So it is failing.
Remove the files and try again.
Second case:
You are trying to reuse the existing controlfiles.
the database name that is recorded in control file is not the same you are using (new dbname).
And Michel was faster
[Updated on: Fri, 04 May 2007 01:17] Report message to a moderator
|
|
|