Re: Delete a datafile?

From: Vikram Goel <vgoel_at_pts.mot.com>
Date: 1996/01/03
Message-ID: <4ce66s$8i8_at_lserv1.paging.mot.com>#1/1


In article <4cc27h$2ok_at_cloner2.ix.netcom.com>, chuckh_at_ix.netcom.com (Chuck Hamilton) writes:
>How do you delete a datafile from a tablespace?
>
>Is there an easy way if you know that no extents have been allocated
>from that datafile?
>--
>Chuck Hamilton
>chuckh_at_ix.netcom.com
>
>Never share a foxhole with anyone braver than yourself!
>

Chuck,

Here is one way to delete a datafile from a tablespace:         

	Take a good backup of the db.
	If the database is in archivelog mode, shut it down normally and start
           it up with noarchivelog mode, safer to mount it only.
	Use the  ALTER DATABASE DATAFILE 'filespec' OFFLINE command.
        Next use ALTER DATABASE DATAFILE 'filespec' DROP command.
        Open the database.

RESTRICTIONS: 1) If you have any data in the datafile to be dropped, it will be 
                 lost.
	      2) Tables which have their initial extent in another datafile and 
                 are extended into the datafile being dropped, will have data
                 corruptions. (NOTE: VERY IMPORTANT Check on this first).
              3) I highly recommend that you do a export of the tablespace
                 from which you need to drop a datafile.
	 	

Hope this helps,

VIKRAM GOEL Sr, DBA Consultant

Aerotek Inc.
Florida

Respond to Email: vgoel_at_emi.net

Views expressed here is my own and not of my employer or clients. Received on Wed Jan 03 1996 - 00:00:00 CET

Original text of this message