sql server - Windows: Cannot delete myDB.mdf because the file is open in System -
sql server - Windows: Cannot delete myDB.mdf because the file is open in System -
this strangest thing ever. company's product uses database file microsoft sql server 2008 r2, let's it's named mydb.mdf
. want delete file , replace same-named database system. seek delete it, , of course of study can't because it's in utilize process. reboot ensure nothing's still running has file open, , still can't delete (same reason). fire sysinternals processexplorer , find->find handle or dll , come in filename. process has open named 'system' , has pid of 4. go command panel -> programs , features , one-by-one, uninstall of components of microsoft sql server 2008 r2. still can't delete it. oh, have ms sql server 2012 installed... maybe that's it. uninstall components of that. , other sql thing microsoft, uninstall too. still can't delete it. reboot. don't open anything, , still can't delete it. gives error "file in use: action can't completed because file open in system. close file , seek again. [try again] [cancel]". opened command panel -> programs , features again, , confirmed there no remaining sql-ish things. , file's icon white sheet of paper top right border folded on (i.e. has no file association).
any thought how can create 'system' not open file can delete it?
the right action right-click on database in sql management studio , take delete. undoing steps you've taken may difficult. i'm assuming/hoping dev server. can revert snapshot or nuke server , install on another?
sql-server windows sql-server-2008-r2 sysinternals
Comments
Post a Comment