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

Posted on 2009-12-22
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
    LVL 22

    Accepted Solution

    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

    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 22

    Expert Comment

    by:Steve Wales
    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

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    oracle 10G 5 37
    SQL Select * from 6 25
    SSN Format in Oracle 2 38
    SQL Agent Timeout 5 27
    How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
    This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now