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: Simple question: remove a a datafile from a tablespace

Re: Simple question: remove a a datafile from a tablespace

From: Oracleguru <oracleguru_at_mailcity.com>
Date: Fri, 04 Sep 1998 13:54:24 GMT
Message-ID: <01bdd81b$1fd1c640$a504fa80@mndnet>


Hi !

Your question does not say why you want to remove the datafile. Is it because it takes too much disk and you do not want it hanging out there ? For example you have datafiles x1, x2 and x3. Most tables except a few are on x1 and you want to delete x2 and x3 even if it has some tables.

Here is one way to do it.

Export the tables associated with datafiles x2 and x3.

Drop the tables associated with datafiles x2 and x3.

Resize datfiles x2 and x3 to almost nothing.

alter database datafile 'x2' resize 8192; alter database datafile 'x3' resize 8192;

Resize x1 to some higher level, up to 2G, so that it can hold the extra tables:

alter database datafile 'x1' resize 500M;

Do the same for tablespace for indexes.

Import the tables, and they will be all contained in datafile x1.

Then you may be able to remove the datfiles x2 and x3. I have not actually removed the datafiles, therefore I cannot comment on it.

Oracleguru
www.oracleguru.net
oracleguru_at_mailcity.com

Pedro Pimentel de Figueiredo <ppf_at_novabase.pt> wrote in article <6soiru$5a8$1_at_duke.telepac.pt>...
> How do I remove a datafile from a tablespace?
>
> Thanks
>
> PS: please cc: your replies to ppf_at_novabase.pt
>
> PPF.
>
>
>
Received on Fri Sep 04 1998 - 08:54:24 CDT

Original text of this message

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