Can I delete the dat file in the Oracle database?
Most Oracle DBAs don't use the ".dat" extension for their datafiles, but it's not impossible. To find out if the datafile is currently in use, issue the following query:
SELECT file_name FROM dba_data_files;
But something else may be using it. I've often found that it is best to "rename" the datafile. For instance, instead of "myfile.dat", call it "myfile.dat.old". This way, if you find that you really need the datafile, you still have it. If some time passes (weeks? months?) an no one ever complains, then you may be able to safely delete the file. Archiving to non-disk media won't hurt either.
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.