« MSDE management using OSQL | Main | MenuItems MergeMenu MergeOrder MergeType »

MSDE Detach Tricks

Closing and disposing SqlConnection objects isn’t sufficient to guarantee that you’ll be able to sp_detach_db a database your done working with. A trick that seems to work is to preceed calls to Close() with a call to ChangeDatabase(“master”).

Use exec sp_who & sp_lock with QueryAnalyzer to monitor the locks as you step through the program.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)