I try to make two databases synchronize in both production and development servers. I am using detach and attach method. Do I need to stop database in SQL Server Service Manager first? I keep getting 'currently in use' error.
Ordinarily, you don't want to just stop the service just to detach a database. You can, but you have to realize that it will stop ALL the databases attached to that server.
By using sp_who, you can see the process9es) that are connected to the database you want to detach by looking at the DBName column.
You can even stop the process by using the kill command. Do NOT kill any processes with a SPID < 50. Those are reserved for SQL Server.
Just find the SPID and enter into QA... Kill 55
This will kill the process with a SPID of 55 (55 being an example).
-George
Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.