DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Drop datafile

  1. #1
    Join Date
    Oct 2000
    Posts
    34
    How I can drop datafile from tablespace?

  2. #2
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    alter database datafile xxx offline drop;


    - Rajeev

  3. #3
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    > alter database
    datafile 'filename' offline drop ;

    be careful and make sure you really want to do that. I was at work for 36 hours in messing up with one of the datafile.To be safe, take your tablespace which contains the datafile offlline.
    I think this z the task you want to do when the database is closed mode/restricted mode.

  4. #4
    Join Date
    Sep 2000
    Posts
    384
    Boss u can never drop a datafile in Oracle.To drop a datafile
    the only way is to drop the tablespace and delete the datafile manually.

    the option of offline drop is for other purpose.Offline drop does not drop the datafiles.it is for making the datafile offline in noarchive mode for maintence purpose .pls read the manuals carefully.
    Radhakrishnan.M

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I concur. You can not drop a datafile without dropping the tablespace. My suggestion would be:
    1. move all objects in tablespace x to tablespace y
    2. drop tablespace x
    3. rm files
    4. create tablespace x with the datafiles you want
    5. move everything back to x from y
    6. drop y
    7. rm files
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  6. #6
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Omegamark is Right. I just recollected what we have gone thru, you can keep it offline, but datafile will be part of the database and tablespace until tablespace is dropped... you can't bring database up once you delete the datafile physically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width