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: dropping a datafile from a tablespace

Re: dropping a datafile from a tablespace

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 24 Jun 1999 14:46:42 GMT
Message-ID: <37734479.64475821@newshost.us.oracle.com>


A copy of this was sent to pauldb <luapdb_at_yahoo.com> (if that email address didn't require changing) On Thu, 24 Jun 1999 06:40:49 -0800, you wrote:

>I have added a datafile to the systems tablespace. but now i
>have no space left on the disk. The question is:
>is there a way to drop the datafile and allocate a smaller
>one? Is there a command for dropping a datafile?
>
>
>
>**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****

alter database datafile 'filename' resize <newsize>;

will work as long as the 'end' of that file hasn't been allocated. YOu can shrink files down to their 'high water'. This means you may have a 500meg file with 10k of data in it that cannot be shrunk since the 10k is at the 'end' of the file.

OTOH, you might be able to take that 500m file and shrink it down to 10k if the data is at the front of the file.

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jun 24 1999 - 09:46:42 CDT

Original text of this message

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