From: richard@r-senior.demon.co.uk (Richard Senior)
Newsgroups: comp.databases.oracle.server
Subject: Re: How to drop a datafile permanently?
Date: 11 Nov 2000 13:36:23 GMT
Organization: Mill Dam Consulting Limited	
Message-ID: <8uji0n$5k6$1@gate.local>
References: <8ui6f0$of$1@nnrp1.deja.com>
NNTP-Posting-Host: nidd.local
X-NNTP-Posting-Host: r-senior.demon.co.uk:158.152.211.38
X-Trace: news.demon.co.uk 973951274 nnrp-09:23431 NO-IDENT r-senior.demon.co.uk:158.152.211.38
X-Complaints-To: abuse@demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Date: 11 Nov 2000 13:36:23 GMT
X-Newsreader: knews 1.0b.1
Lines: 34


On 11 Nov 2000, argosy22@my-deja.com wrote:

> I can easily create a tablespace:

[snip CREATE TABLESPACE ...]

> and add a datafile:

[snip ALTER DATABASE CREATE DATAFILE ...]

> But, how can I drop this datafile by itself?

[snip ALTER DATABASE DATAFILE ... OFFLINE]

> Is there a way to permanently drop this datafile from the database?

When you create a tablespace in the way that you show, Oracle creates a
file in the filesystem and associates the tablespace with it. 

You don't normally need to use the 'ALTER DATABASE CREATE DATAFILE'
command to create datafiles. That command is normally used when you have
lost a file, e.g. disk failure, and you are recovering it from archived
redo logs.

If you want to drop a tablespace, use the DROP TABLESPACE command. Note
that this does not delete the associated data file from the filesystem --
you need to use operating system commands to do that. 

-- 
Regards,

Richard Senior
Mill Dam Consulting Limited
http://www.milldam.com

