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: cloning a db

Re: cloning a db

From: <SUSOTT_at_amnutrition.com>
Date: Thu, 7 Mar 2002 14:58:44 -0700
Message-ID: <u8fokk8ot14r90@corp.supernews.com>


"Trifon Anguelov" <trifona_at_pacbell.net> wrote in message news:SqAh8.207$E22.105147658_at_newssvr21.news.prodigy.com...
> Susott,
>
> Did you shutdown the Oracle services in Services before copying the
> datafiles?
>
> Also verify that all the dbf files were copied to the correct directories.
> Also
> double check to see if all of them are from the same database. You might
> have
> attempted to create controlfile before copying all the files and then
> alter added that file.
>
> When you try doing that, it allocates a db_id and after which if we add
any
> new files it considers them to be from a different db and gives the errors
> received.
>
> So will have to copy all the files before creating the controlfile. In
this
> case you had to copy the datafile all over again and then create the
> controlfile.
>
> Hope that helps somehow.
>
> Trifon Anguelov
> Senior Oracle DBA
>
> Check the latest Oracle DBA forums on:
> http://www.dbaclick.com/cgi-bin/ib3/ikonboard.cgi
> --------------------------------------------------------------------------

--

> -----------------------------
>
>
>
> <SUSOTT_at_amnutrition.com> wrote in message
> news:u8d9cq8qmpcd80_at_corp.supernews.com...
> > Attached are init.ora and ccf.sql(modified trace file).
> >
> > I am attempting to clone an Oracle database. I have 2 PCs running W2K
and
> > the database is 8.1.7.0. In accordance with a set of procedures from
> > Google, I backed up the control fille to trace and edited it. (Changing
> the
> > sid name to the new name and added 'set' to the create controlfile.) I
> > shutdown the database and then copied all of the data files specified in
> the
> > trace file to a different location. I copied the trace file and init
file
> > to the same location. Finished with the origional database, I opened
it.
> >
> > New machine:
> > I installed Oracle off of the CD naming the sid with the new name
(play).
> I
> > verified everything was running and even connected from a client
machine.
> I
> > shut down the instance, copied all data files to the location in the
trace
> > file. Verified I had no reference to the old sid in the init.ora and
> trace
> > files, and copied them to c:\oracle\admin\play\pfile\*.* (overwriting
the
> > origional init.ora file.)
> > Skipped making the new service as the sid isn't changing.
> > performed startup nomount pfile=c:\oracle\admin\play\pfile\init.ora.
> > ran the modified trace file to create the new instance.
> > This gave me ORA-01161: database name PLAY in file header does not match
> > given name of DEV.
> > Oracle tells me don't mix data files.
> > I then manually tried to open database and received this error
> > ORA-01110: data file 1: C:\oracle\oradata\play\SYSTEM01.dbf"
> > ORA-01206: file is not part of this database - wrong database id.
> >
> > Long preface, Questions are: Does the system01.dbf have the instance
name
> > inside? How can it then be changed? If I don't copy that file, but
every
> > other file, will that produce a consistant database? What have I
missed?
> >
This must have been the case. I had tried several times to get the "clone" up and running, sometimes copying all datafiles over, sometimes not. I couldn't recall if the last time everything was a fresh copy of the development instance. So I deleted Oracle from the new machine, per Oracle's instructions and then re-installed a fresh copy of Oracle. I then insured I could connect from a client. I then copied all the files, modifying the trace control file again. (gets easier the tenth time around). When I ran the procedure this time, I received no errors. I connected to the clone and insured I could access the tables. Thank you for the assistance.
Received on Thu Mar 07 2002 - 15:58:44 CST

Original text of this message

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