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: Copy database?

Re: Copy database?

From: David Cabrey <david.cabrey_at_pnl.gov>
Date: 19 Mar 2004 11:09:45 -0800
Message-ID: <a870dfaa.0403191109.6f4a903e@posting.google.com>


"Noel" <tbal_at_go2.pl> wrote in message news:<c3efbn$t5i$1_at_inews.gazeta.pl>...
> > I need to create a copy of my existing database as part of a migration
> > process. However, it can only be run on the same server so I need to
> change
> > the SID. The database is about 100GB and running on an NT4 server.
>
> Well, if both version of Oracle matches and all database files are stored in
> one
> folder (under NT as far as i remember control files , initiolization files
> and data files are in one folder as default)
> you might try to copy only that folder.
> I succesfully moved database that way.
> First install new database, shutdown it, overite database files and try to
> start it.
> It worked fine but version of Oracle was 7.3.4

User the 'alter database backup controlfile to trace' feature. Run this on the existing database. This command will put a trace file in the SID's udump area. The file name is like any other trace name... so look for the most recent one and copy it somewhere. Edit the comment information at the top out. At the first line where it says....

CREATE CONTROLFILE REUSE DATABASE "SOMESIDNAME" NORESETLOGS... change the REUSE to SET and give the new sid name.

Then make sure ALL the files in the command below map to the correct location of the new database you are creating new control files for.

Change your oracle environment to point to the new sid... sys as sysdba into sqlplus and run the commands in the control file trace you just edited.

Note -- there are two CREATE CONTROLFILE statements in a 9i trace dump of this type. The first one DOES NOT DO a reset log... the second one does. You will have to use the reset log when SETting a new SID name.  So make sure you look at the entire trace dump file before doing anything to seperate these two commands.

This command will create new control files and place them in the location specified by the init.ora file... so make sure the control files are not there before running this.

dave Received on Fri Mar 19 2004 - 13:09:45 CST

Original text of this message

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