Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Relocating dbf,ctl and log files

Re: Relocating dbf,ctl and log files

From: Hans-Friedrich Pfeiffer <Hans-Friedrich.Pfeiffer_at_t-online.de>
Date: 14 May 1998 21:28:35 GMT
Message-ID: <6jfnm3$1o1$1@news00.btx.dtag.de>


Angel Layva wrote:
>
> Can anyone briefly go over the steps for relocating a database from one filesystem to another. I need to move dbf files, control files, and log files to a new filesystem.
>
> Thanx in advance
> A

Hi Angel,

what a question ! I'll try to give the main hints to your problem. First :

make a cold backup of your database !!! You can also do a warm backup but be VERY carefully with your redo-log-files.
Log on to ORACLE as INTERNAL and create an ascii-file which contains the infomation held in your control-files. You'll do this by typing :

alter database backup controlfile to trace.

You'll find this file under user-dump or bdump ( refer to your init*ora ).

Shut down your database.

Edit this controlfile and put in the new locations of your datafiles. Edit your init*ora-file.
Copy all files to their new locations.
Start up your database.

Edit hte ascii-file metioned above and let it run under ORACLE to create ayour new controlfiles.

Startup your database.

I left out some details as I don't want to copy pages of pages of the manuals.
The key for renaming or copying database is : create a new controlfile !

Another way is to take offline each tablespce, to copy all the datafiles and to tell ORACLE the new locations of your datafiles ( alter database rename file ... to ... ). In some cases ( when the database is in use ) you might need to recover a database. Don't woory, do it with 'recover datfile ... ), it works fine. IN the same manner you could copy your controlfiles afterwards by shutting down the database, editing your init*ora, copying ( NOT MOVING !! ) your controlfiles. All this works fine except the system tablespace - you can't take it offline. In that case you MUST create a new controlfile.

Good luck,

Hans Pfeiffer
ORACLE Administrator Received on Thu May 14 1998 - 16:28:35 CDT

Original text of this message

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