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 to new machine method...

Re: copy database to new machine method...

From: Glen A Stromquist <glen_stromquist_at_nospam.yahoo.com>
Date: Wed, 05 Jun 2002 14:28:28 GMT
Message-ID: <gepL8.25444$qA.913801@news2.telusplanet.net>


I have done it in the past where I did not have the same directory structure and/or same drive array, in these cases I edited the trace file from "backup_controlfile_to_trace" to reflect the new locations and do a "create database" rather than "create controlfile". I suppose that both methods have the same end result, but I have not done it just by re creating the controlfile

Usually if I'm just creating a clone for testing purposes I'll use files from my last hot backup and apply archive logs to get it current(if I have the time), this gives me both "practice" on restores and shows me that my online backups are working.

I have also used exp/imp, but have not had much success in importing a full export, I usually end up creating the tablespaces and users and importing using the from user clause. I do use import to refresh the test db's however.

Good point about re running the catalog/catproc scripts if new db has a newer patchset. I just received the cd set for 8.1.7 release 3 but notice that the installer still read 8.1.7.0.0 so I have to investigate further to see if indeed they sent me the correct cd's (the box does say feb-02 release)

cheers!

"Rauf Sarwar" <rsarwar_at_ifsna.com> wrote in message news:c2d690f2.0206042151.6df7821e_at_posting.google.com...
> Glen A Stromquist <glen_stromquist_at_nospam.yahoo.com> wrote in message
news:<%kbL8.21900$qA.755398_at_news2.telusplanet.net>...
> > To move an 8.1.7 db to a newer machine with the same OS(2000 advanced
> > server) I decided to try the following rather than the usual exp/imp or
> > clone using copy datafiles etc.. and create database/controlfile from
trace
> > file:
> >
> > *installed 8.1.7 on new machine, create listener
> >
> > *shutdown db on old server
> >
> > *did cold backup
> >
> > *created identical directory structures for db on new machines drives
(drag
> > & drop)
> >
> > *copied datafiles, init.ora, control files and redo logs to new machine
> >
> > *created internal password using orapwd
> >
> > *set oracle_sid to [sid]
> >
> > *create instance on new machine using oradim -new -sid [sid] -pfile
> > ["pfile"]
> >
> > *start new instance using oradim -startup -sid [sid] -intpwd [pwd]
> > -starttype srvc -pfile'[pfile] (-starttype srvc,inst returned
ORA-12560?)
> >
> > *use net8 assistant to create tnsnames.ora with new sid
> >
> > *start up database from svrmgrl using startup pfile=[pfile]
> >
> > This almost seems to easy, at least it went much smoother than any other
> > method I've used in the past. With the datbase shutdown, one could even
> > drag the entire directories and contents to the new machine rather than
use
> > the backed up files. (this is not a large database)
> >
> > Before I put this in to production is there any possible pitfalls I may
> > have missed using this method?
> >
> > TIA

>
>

> This is very easy if you are re-creating the database on a different
> Win32 platform i.e. WinNT/2000 server. However, few things to
> remember.
>

> 1) You don't have to create the exact same directory structure on the
> new machine (If you choose not to). You can re-create the control
> files and assign different directory structure.
> 2) When you shut down the original instance, use "shutdown normal"
> from server manager. You can do this by "shutdown immediate" then
> "startup" and then "shutdown normal". This way all your log files are
> flushed out and you won't have to perform recovery "using logfiles"
> when creating new database. This is useful if you are creating
> different directory structure.
> 3) Make sure that Oracle versions on both machines are same down to
> the exact patchset. You can still create the database on the new
> machine if patchset on the new machine is greater then the original
> machine. In this case you would have to run the catalog files again to
> bring your database to new patchset and recompile all invalid objects.
> However, you cannot re-create the database this way if new machine is
> on older patchset then the original one...you would need to exp/imp.
>

> Regards

>
> //Rauf Sarwar
Received on Wed Jun 05 2002 - 09:28:28 CDT

Original text of this message

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