Monday, May 14, 2018

SQL database stuck going offline

If you are trying to take a database offline and it got stuck, looks like it is not accessible anymore, but it’s not quite offline, you need to kill all the processes related with that Database.

With the next command, see all the processes running and look for the ones related with the database:

EXEC sp_who2

Get each SPID with the DBName database you want to take offline, the use the next command to kill each process

KILL <SPID>

This should solve your problem.

1 comment:

  1. According to Stanford Medical, It's in fact the SINGLE reason this country's women live 10 years longer and weigh on average 42 lbs lighter than us.

    (And realistically, it really has NOTHING to do with genetics or some hard exercise and absolutely EVERYTHING to related to "how" they eat.)

    P.S, What I said is "HOW", and not "what"...

    Click on this link to discover if this little quiz can help you discover your true weight loss potential

    ReplyDelete