Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Copying database to another instance possible ?

Re: Copying database to another instance possible ?

From: <mandersloot_at_my-dejanews.com>
Date: Thu, 11 Mar 1999 20:26:22 GMT
Message-ID: <7c98t1$lep$1@nnrp1.dejanews.com>


Simon,

You should do the following:

STEP 1: Enter the following command:

alter database backup controlfile to trace;

The resulting file should be edited in way that it will point to the new database files. Besides this you should change the database name. So line:

CREATE CONTROLFILE REUSE DATABASE "OLDname" NORESETLOGS NOARCHIVELOG

should be changed to:

CREATE CONTROLFILE REUSE set DATABASE "Newname" NORESETLOGS NOARCHIVELOG

STEP 2 Shutdown database afterwards (normal)
STEP 3 Copy database files including logfiles

STEP 4 Make an new init.ora file including the new database name. And start the database with script you've created in step 1.

STEP 5 Bring up the orginal database.

Good luck

Kees
In article <7c2ovg$trb$1_at_nnrp1.dejanews.com>,   sverzijl_at_hotmail.com wrote:
> Hi All,
>
> Can someone tell me what the common way is to copy/restore a database to
> another instance ?
>
> (e.g. in DB2 there is the command 'RESTORE DATABASE PROD INTO TEST' to
> accomplish this).
>
> In Oracle I only know of a full export/import of a database, but this is a
> very time consuming task. I tried copying the datafiles and recreating the
> controlfile from the 'backup to trace' (replacing the datafile paths to point
> to the new database location), but this doesn't work since Oracle checks the
> header of the datafile comparing the database name.
>
> There must be a faster way than a full export/import to copy a database, isn't
> there ?
>
> Regards,
>
> Simon Verzijl
> Devote
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Mar 11 1999 - 14:26:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US