Skip to Main Content
  • Questions
  • Removing a datafile associated with a tablespace that is no more in the database

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Santhosh.

Asked: January 19, 2017 - 7:06 am UTC

Last updated: January 21, 2017 - 4:55 am UTC

Version: 12.1.0.2

Viewed 1000+ times

You Asked

I have a situation where there is a datafile which is associated to a tablespaces say ADMIN_TBS. but the tablespace is dropped by a script and the file is still present. Can anyone suggest how i can remove that file. I cannot risk to manually remove as it may corrupt the db. I ran the alter database admin_tbs drop datafile <filename>; but i get an error saying the tablespace admin_tbs doesnt exist.

and Connor said...

If you have dropped the tablespace, the file can be removed at the OS level without problem.

If you're worried about it still being open, you can run 'fuser' on the file to ensure that no process is still using it.



Is this answer out of date? If it is, please let us know via a Comment