Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Moving database from one machine to another
Hi,
---Top posting--- :-)
My recreate controlfile script is as simple as
<START>
set echo on;
spool recrctl.log;
connect internal;
STARTUP NOMOUNT;
CREATE CONTROLFILE REUSE
SET DATABASE "<DBNAME>"
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 200
LOGFILE
GROUP 1 (
<fullpath to redo1>)
SIZE <size redo1>,
GROUP 2 (
<fullpath to redo2>)
SIZE <size redo2>,
GROUP 3 (
<fullpath to redo3>)
SIZE <size of redo3> RESETLOGS
DATAFILE
<list datafile>
ALTER DATABASE OPEN resetlogs;
<END>
Change the <????> to what ever is required, except for <BEGIN> and <END>
Make sure the location of your new control files are in the pfile init.ora
file.
Also another wierd thing to watch out for is the OLD database running.
If you can shut it down to start the new one, that would be good.
Every now and then if the old database is running I find it says an Instance
for this
database is already running.
Cheers and good luck
Craig.
"James Bond" <james_at_bond.com> wrote in message
news:a695ej$cpsdh$1_at_ID-80970.news.dfncis.de...
> I have a cold backup in the form of a tar archive on tape from one
database
> that I want to restore onto another machine.
>
> 1. The tar archive has absolute pathnames
> 2. I want the new database on the new machine to have a different name
> 3. I want to completely move the files for the new database to different
> locations (the old database didnt follow OFA and I want to remedy this)
>
> Here is what I was thinking of doing:
>
> 1. Restore the tar archive from tape to the new locations on disk as
> follows:
>
> pax -r -f /dev/rmt/0 -s,old1,new1,p -s,old2,new2,p ... -s,oldN,newN,p
> old1 old2 ... oldN
>
> where oldN is the old FULL pathname of each database file and newN is the
> new place I want it written to.
>
> This will move all the files of the old database to the new OFA compliant
> locations I want.
>
> 2. Change the init.ora file to point to the new controlfile locations
>
> 3. sqlplus /nolog
> connect internal
> startup nomount
> create controlfile set database NEWSID
> logfile ....
> datafile ....
> noresetlogs;
>
> This will recreate the controlfile pointing to all the new file locations.
>
> 4. alter database open;
>
> Any problems with this?
>
> Any comments and tips greatly appreciated.
>
> Thanks
>
>
>
Received on Thu Mar 07 2002 - 23:04:53 CST
![]() |
![]() |