troubleshooting Question

Take a database offline when it has open connections

Avatar of TAMUQITS
TAMUQITSFlag for Qatar asked on
Microsoft SQL Server
3 Comments1 Solution2854 ViewsLast Modified:
I want to take a database offline to do some testing. When I select the database > right click > Select All Tasks > Take Offline I get the error:

[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft][ODBC SQL Server Driver][SQL Server]Database state cannot be changed while other users are using the database 'myDB'

Two questions:
1) How do you determine who or what is connected to the database?
2) How do you kill those connections?

Thanks
Russell Lindell
ASKER CERTIFIED SOLUTION
adathelad

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros