Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > Oracle > Oracle 10g     

Drop wrongly added Datafile in Tablespace(10gR2)


Unfortunately, you can't. Prior to Oracle Database 10g Release 2, your only clean option for
removing a datafile is to drop the entire tablespace and then rebuild it without that
particular file. If the tablespace contains data, you have to go through the time-consuming
and laborious process of storing the data on a separate location and reinstating it. In
addition to its inconvenience, this process makes the tablespace unavailable.

Thankfully, in Oracle Database 10g Release 2 the process has been simplified: You can just
drop the datafile. For example, the following command will remove the indicated datafile from
the tablespace as well as from the server.

SQL> alter tablespace users drop datafile '/u01/users02.dbf';

There are a couple restrictions, however: The datafile must be empty to be dropped. You can't
drop the last datafile in a tablespace; the tablespace itself must be dropped. And the
tablespace must be online and in read-write status.


  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

     (Average: 5 / Votes: 2)   Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #268
views : 554
Added on : 08/11/10
Submited by : grk.oracle
E-mail address : grk.oracle@gmail.com
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (2)
 
 
<< Previous Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Operating Systems > Unix : How to kill Unix user session  
  Databases > Oracle : Kill user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Mobile Phones / Tablets | Office Software
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com