Can we remove datafiles from tablespaces without droping the tablespace? I have tried to delete the file using SQL commands and OEM, but I could not.
There is no way to remove a datafile from a tablespace once it has been added. About the best you can do is to size the datafile down to a really small size.
If you truly wish to remove this datafile, your only recourse is to remove the tablespace's entire contents by moving the segments somewhere else, or exporting them. Then, drop the tablespace, recreate it without this datafile, and bring the segments back into the tablespace.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.