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: Advice needed on moving datafiles

Re: Advice needed on moving datafiles

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Tue, 03 Aug 1999 08:03:41 -0400
Message-ID: <37A6DA9D.74A48DF4@Unforgettable.com>


You didn't say what version of Oracle you are using. It is very difficult to make good recommendations if we don't know what version you are using because with each release Oracle includes enhancements which make management of the rdbms easier.

However, have you considered just renaming the file?

Try this:

alter database rename file '/oldlocation/datafile.dbf' to 'newlocation/datafile.dbf'

then take the database down, physically move the file and then bring the database back up.

If you do it this way then you don't have to fiddle with the contents of the file.

Alternatively, why not export the data. Create a new datafile in the new location. Drop the old tables/indexes, drop the old datafiles and then import the data into the tablespace. At that point it will be in the new datafile.

There are a lot of different alternatives for what you want to do. What you need to decide is what strategy you want to follow.

Ken

dipenk_at_my-deja.com wrote:

> We have a tablespace for all our indexes, which has two datafiles, df1
> and df2. We have now aquired a new disk and I need to move this
> tablespace to the new disk (and to larger datafiles) to free up some
> space on the old disk.
>
> There are approximately 120 indexes and some of them currently have
> extents on both file 1 and 2. There are also some primary key indexes.
>
> If anybody has any advice or tips on the best way to go about doing this
> it would be greatly appreciated. The method I intend to use is :
>
> 1) Drop indexes that are on datafile df1.
> 2) drop datafile df1 from tablespace.
> 3) Add larger datafile newdf1 to tablespace.
> 4) recreate indexes that were dropped.
> 5) Repeat with datafile df2.
>
> Will I have a problem with PK indexes?
>
> Thanks in advance,
>
> Dipen
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Tue Aug 03 1999 - 07:03:41 CDT

Original text of this message

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