/compactdb - file is in use by another process

.NET obfuscator and automated error reporting

/compactdb - file is in use by another process

Postby jfleisher » Wed Jul 24, 2013 3:16 pm

Searched and found no posts concerning /compactdb. Surprising since I can't get this option to work on either machine that I've tried. Must be missing something that is needed to make it work.

Code: Select all
C:\\Program Files\\Red Gate\\SmartAssembly 6>SmartAssembly.com /compactdb
SmartAssembly v6.8.0.121
Copyright c Red Gate Software 2005-2013

System.IO.IOException : The process cannot access the file because it is being used by another process.

I've tried everything I know to find a process using database.mdb or .ldb but so far I'm unsuccessful at running the /compactdb command on two separate machines that I've tried. One is a developer machine and the other is a production build server.

Using Process Explorer (Run as Admin), I can't see any process that is using database.mdb. I have rebooted the machine. I have ran the smartassembly GUI and found the file in use at that point, but exiting the GUI frees the handle to that file.

Is it possible to successfully use /compactdb and how can it be done? The OS levels are WinServer2012 and Win8.


Posts: 3
Joined: Wed Jul 24, 2013 3:03 pm
Location: United States

Postby jessica.ramos » Thu Jul 25, 2013 5:26 pm

So sorry about this--I'm experiencing the same issue on my machine and it looks to be a new bug introduced in version 6.8 ( the /compactdb switch still works when I try with version 6.7 and older). I've logged a bug for it with reference SA-1376-- many thanks for bringing it to our attention!

This is quite a hacky workaround but what one option to successfully use /compactdb for now is to install version 5 of SmartAssemblyon your machine (you'll have to uninstall version 6.8 first and then reinstall it after version 5 is set up). You can then run the /compactdb from the SA v.5 installation folder whenever needed.
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Posts: 542
Joined: Mon Apr 23, 2012 12:13 pm

Postby jfleisher » Thu Jul 25, 2013 7:33 pm

Was able to use that work around. Thanks for the link to v5. Thanks also for reporting the bug.
Posts: 3
Joined: Wed Jul 24, 2013 3:03 pm
Location: United States

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests