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: DB-Copy for testing on same machine...

Re: DB-Copy for testing on same machine...

From: Liz Reen <lizr_at_geologist.com>
Date: Wed, 14 Mar 2001 16:17:37 -0500
Message-ID: <MPG.151990e03e1336c69896c8@news.supernews.com>

In article <3AAF8DA7.852534C1_at_vie.ce.philips.com>, schicht_at_vie.ce.philips.com says...
> Hello, i am using Oracle 7.3.4 on HP-UX!
>
> I have to create a new instance for testing purposes on the same machine
> -> no problem, i have done this already.
>
> The final test-database should be a 1:1 copy of the original!
>
> My first idea was a FULL-export of the DB and to import it into the
> test-DB.
> But this is not possible, because the pathes of the files are hardcoded
> in the dumpfile.
> So i tried to change all this pathes with a little sed-script -> the
> altered file was smaller than the original, even though the original
> path is shorter than the altered (Dumpfiles have a special
> fileformat...).!! It´s also not possible to edit a dumpfile with an
> editor.

Yup, you found out the hard way. You could just export the schema instead of the whole database.
>
> Does anyone know a possibility to do a 1:1 copy on the same machine.

Yes. On instance a:
backup controlfile to trace
Shutdown the database
copy the datafiles to the new instance's directories The backed up control file will contain the location of the datafiles. Edit it to reflect the new locations
also change the line
CREATE CONTROLFILE REUSE DATABASE "A" NORESETLOGS NOARCHIVELOG CREATE CONTROLFILE set DATABASE "B" NORESETLOGS NOARCHIVELOG (this will rename the database to the new name) restart the new instance

Good luck,
Liz Received on Wed Mar 14 2001 - 15:17:37 CST

Original text of this message

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