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: switching datafiles that are used

Re: switching datafiles that are used

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Thu, 05 Jan 2006 20:35:22 GMT
Message-Id: <pan.2006.01.05.20.35.22.471582@sbcglobal.net>


On Thu, 05 Jan 2006 11:44:17 -0800, balvey wrote:

> I'm running 9i on a Unix AIX 5 system. I have a logical volume that is
> getting full and have created a new volume that I want to start using.
>
> I want to create a datafile, on the new disk, for each datafile that
> existed on the old disk.

There is a litle known and unexplored command called "cp". You should shut your database down and utilize this expert command:

cp /olddir/* /newdir/

Please, you should not execute something like rm -rf $ORACLE_HOME under any circumstances. When cp command finishes (and that might take some time, depending on the size of your database) you should bring your database up to the mount phase ("alter database mount") and rename all the files by utilizing "alter database rename file <old file> to <new file>" command for each and every one of them.

Your database is now mounted and files are renamed. You can now open the database and remove the old files.

> After doing this how can I insure that I wont
> write to the old disk anymore?
>
> I have turned off the autoextend on those old datafiles, is that enough
> to get them to quite writing to the old files when they have used what
> has been allocated already? I'm also going to resize the old datafiles
> after I have completed the creation of the new ones.

-- 
http://www.mgogala.com
Received on Thu Jan 05 2006 - 14:35:22 CST

Original text of this message

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