clonning a database [message #160042] |
Wed, 22 February 2006 23:21 |
kinjal
Messages: 124 Registered: June 2001
|
Senior Member |
|
|
Hello,
I have one prod server and a test server with different structurs.
my prod database in running in archive log mode and test database is in noarchive log mode.
Now I want to make both of them equel.
How can I clon the database?
Do I need to drop the database on test server and then copy whole the things from prod database or some other way is there?
Can anyone please tell me the steps to clon my database?
Its urgent.
Thanks.
Kinjal
[Updated on: Wed, 22 February 2006 23:37] Report message to a moderator
|
|
|
|
Re: clonning a database [message #160227 is a reply to message #160060] |
Fri, 24 February 2006 00:13 |
kinjal
Messages: 124 Registered: June 2001
|
Senior Member |
|
|
Hello,
Thanks for this info.
Now I think what i will do is,
I will delete all datafiles, controlfiles, logfiles and init.ora from my test server.
Then I will copy cold backup of my production database to test server.
Now in this case do i need to create controlfile (using alter database backup controlfile to trace) from production database and then copy it to testserver or
do i need to copy all *.dbf, *.ctl and *.log and init.ora to testserver and then try to open the database?
And after copying everything, may i apply archive logs created in prod environment?
What should I do I am not able to understand. Can you please guide me as I am doing this for the first time.
Kinjal
|
|
|
Re: clonning a database [message #160230 is a reply to message #160227] |
Fri, 24 February 2006 00:23 |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
Kinjal,
Its going to be a total new instance so copy everything from production to test as mentioned in the link.
And do take a backup of controlfile using the command ( don't simply copy it) and recreate the controlfile on the test server.
Note: Read the link carefully before implementing.
|
|
|
Re: clonning a database [message #160239 is a reply to message #160230] |
Fri, 24 February 2006 00:53 |
kinjal
Messages: 124 Registered: June 2001
|
Senior Member |
|
|
In this case, Should I create controlfile with first option -noresetlogs option?
and after doing this may I apply archive logs of production database to testserver database?
Kinjal
|
|
|
Re: clonning a database [message #160697 is a reply to message #160042] |
Tue, 28 February 2006 02:08 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
Do you close your prod db when you are copying the files?
Recreate controlfile is not needed if it is a cold backup!
Shutdown the prod db and then copy all the files including
controlfile to the same path as prod db and open the database directly.
|
|
|
Re: clonning a database [message #160699 is a reply to message #160697] |
Tue, 28 February 2006 02:11 |
kinjal
Messages: 124 Registered: June 2001
|
Senior Member |
|
|
Yes I will close my prod database. Then will take a cold backup.
Ok so I need to just copy all the *.dbf, *.ctl, *.log files and init.ora file to the same location in test server. And then I can start my instance.
Ok after doing this, can I apply archive logs from prod database to test database if needed?
Kinjal.
|
|
|
Re: clonning a database [message #160725 is a reply to message #160699] |
Tue, 28 February 2006 03:32 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
One more thing, you have to create a service by using command oradim if your server is windows. This step don't need on Unix or Linux.
You can apply the archive logs if you didn't do any update on the test db. But if you have done changes on the test db after restore, you cannot apply archived log then. FYI.
[Updated on: Tue, 28 February 2006 03:34] Report message to a moderator
|
|
|
|