[Webinar] Learn how to a build a cloud-first strategyRegister Now


How to "copy" database to a clean oracle installation ?

Posted on 2009-12-22
Medium Priority
Last Modified: 2013-12-19
i have an oracle server that is dying.
I mirrored the OS from that server and installed on a new server.
Now I have a server that has oracle installation on it ( 8i)
Now I need to "import" the database that is on drive D:
I tried mirroring ...but not working...
So I guess I need to "re-create" the whole database and restore it.
Can u gurus help me ?

I have a dmp file that is being run every 6 hours, so I could get a new one...
but how to "re-create" the users...the structure...etc... before using the import command ?
thanks a lot
Question by:ammounpierre
  • 2
LVL 23

Accepted Solution

Steve Wales earned 2000 total points
ID: 26110088
One way is to do this:

From your current database issue: alter database backup controlfile to trace;

This will give you a text file in your user_dump_dest.   This will containt a CREATE CONTROLFILE statement (possibly two, can't recall off the top of my head if Oracle 8 gave you two or one.).

Recreate your filesystem structure on the new server.   Easiest if everything goes into the same place as before but not critical.

Shutdown your current database (assuming you can get an outage window).
Copy all the files (database files, redo log files, control file, init.ora) over to the new server in the same place.

Taking the file we saved in the first step, edit it so that the first line reads: (replacing DBNAME with your database name):


Save the script and run it.

If everything is in the same place and the database was shut down cleanly before copying, the database should be recreated.

You also may need to execute: ALTER DATABASE OPEN RESETLOGS at the end to get the database to open.

That's a fairly straightforward way of dealing with a straight up database copy between servers (if your downtime windows and overall size of the database permit it) and much faster than an import export.  It will also maintain your structures, users, stored procedures, triggers etc.

Author Comment

ID: 26110551
This is what I did , please advice..

I mirrored the C:\ drive (BOOT) where Oracle is installed (containing Windows REG...etc...)
I shutdown the oracle DB , and stopped all the services...
and copied the Whole D:\ Drive where all CTL and LOGs and DBF files are.

Now I will try the following:
-Restore the C:\drive (image )
_copy all files to the new D:\drive using the same structure.
hope it works...
Anything else I should do ?
LVL 23

Expert Comment

by:Steve Wales
ID: 26142984
Make sure that the paths in your init.ora and your create control file are all pointing to the correct files....

See how you go.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question