Cloning of database [message #177327] |
Wed, 14 June 2006 03:39 |
mitra.kausik
Messages: 21 Registered: June 2006
|
Junior Member |
|
|
I need to clone my production database into a test environment
The steps I followed in the production server
alter database backup controlfile to trace resetlogs;
Then viewing the trc file I copied all the DB files into a test environment.
In the test environment I created a new instance say X and modified trc file with this new sid x , init file with new sid X and thereby physical files location as per the test machine.
After creating the instance in the test machine.
Startup nomount pfile=......initx.ora
@ctrl.sql
The above sql file only contains the create controlfile command.
But when I execute the sql file it is saying
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01161: database name DEEPA in file header does not match given name of KM
ORA-01110: data file 1: 'E:\oracle\product\10.1.0\ORADATA\KM\SYSTEM01.DBF'
Sytem datafile header contains the production db name which is not matched with new db name in the test environment.
Can anybody please let me know how to overcome this.
Thanks
|
|
|
Re: Cloning of database [message #177331 is a reply to message #177327] |
Wed, 14 June 2006 04:01 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
Lookup the CREATE CONTROLFILE syntax in the SQL Reference guide:
create controlfile SET database...
"Use SET DATABASE to change the name of the database. The name of a database can be as long as eight bytes."
|
|
|
Re: Cloning of database [message #177332 is a reply to message #177327] |
Wed, 14 June 2006 04:01 |
mitra.kausik
Messages: 21 Registered: June 2006
|
Junior Member |
|
|
The above mentioned problem is resolved I had to use Set database
Now control file is created.
When I give alter database open resetlogs;
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.1.0\ORADATA\KM\SYSTEM01.DBF'
I used
Recover database using backup controlfile
The archive log it is asking for is not present in the production environment.
Can anybody please help me.
Thanks
[Updated on: Wed, 14 June 2006 04:32] Report message to a moderator
|
|
|
Re: Cloning of database [message #177508 is a reply to message #177332] |
Thu, 15 June 2006 03:11 |
mitra.kausik
Messages: 21 Registered: June 2006
|
Junior Member |
|
|
Finally I got it resolved this is how
One of the online redo log file was missing which I copied from the source to the target and then used
Recover database using backup controlfile;
thereby gave the path of that online redo log file
Log applied
Media recovery complete
Its working fine.
|
|
|