Delete locked Microsoft Access (MDB files) in Windows 2003

Nothing is more frustrating than when you’re playing on a three hour rock band bender in the data center when a  developer calls up and needs you to delete a file and Windows tells you it shove it because the file is locked.

Recently, I had an Access database I needed to delete. It just so happens that this Access database was being used on as a data source for a web site being served in IIS.

Unfortunately this server hosts over one hundred or so other web sites, so rebooting it was not an option. I found out if you simply stop the application pool for that particular site, it will allow you to delete the MDB file.

Steps:

Open IIS Manager:

Navigate to start -> all programs -> administrative tools -> Internet Service Manager

If you know which application pool the web site which is using the locked MDB file continue to the next step otherwise:

Expand Web Sites -> Right-Click on the affected web site, click Home Directory, Be sure to note the value of “Application Pool”

Now that we are certain to know the name of the application pool:

Expand the COMPUTERNAME -> EXPAND Application Pools -> Right-Click on the appropriate application pool and click stop.

Now that the application pool is stopped, delete the locked Access Database (MDB file)

Restart the affected application pool:

Right-Click on the affected application pool, click start

The MDB file is deleted, your app pool is running, the developer is happy and you’re back to trying your Rock Band marathon. Rejoice!

-Drew

Be Sociable, Share!

Tags: , ,

Leave a Reply

You must be logged in to post a comment.