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: Howard J. Rogers <howardjr_at_www.com>
Date: Thu, 15 Mar 2001 20:27:03 +1100
Message-ID: <3ab08a9f@news.iprimus.com.au>

"Liz Reen" <lizr_at_geologist.com> wrote in message news:MPG.151990e03e1336c69896c8_at_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

He will have to change "NORESETLOGS" to "RESETLOGS", and the bit in the script that says 'alter database open' will have to be changed to read 'alter database open resetlogs'.

HJR
> (this will rename the database to the new name)
> restart the new instance
>
> Good luck,
> Liz
Received on Thu Mar 15 2001 - 03:27:03 CST

Original text of this message

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