Let's say I want to (using Visual Studio) run a schema comparison between two databases, restore one of them from a backup, and run the schema comparison again. The schema comparison maintains a connection to the database, and SQL Server won't let me run the restore without removing all connections. Is there a way I can force the schema comparison to disconnect without closing it?
views:
11answers:
1
A:
You could:
- Close all activities on the database (MSSMS right click on server > Activity monitor > close processes)
- Delete the database (check close all connections) then restore the database
- Change the connection to other database
- Save the schema compare > close it > restore > open schema compare
rdkleine
2010-08-03 14:36:34
Changing the connection is probably the best way to go about it, and probably the only one I hadn't considered. I'll see if I can adapt it into my workflow.
Chris
2010-08-03 19:00:05