February 27, 2009 at 3:54 am
Hi forum, I was deleting a database with close existing connection option then the database went in single user mode and now it is inaccessible. Trying to delete through script it says the database is already open and cant be used by another user. please tell me how to get that in the normal form?
And sometimes i find some databases go in recovery mode. how to get rid of all these? Please help.
February 27, 2009 at 4:36 am
Know the processid of the the session that is using the database using sp_who2. Then kill that process then you may get access of that database.
February 27, 2009 at 4:44 am
Thanks for the reply that worked. But yet i wanted to know why database go in these modes(single user/recovery/suspect) and how to get rid of these situation.
Any information is appreciated. Thanks
February 27, 2009 at 9:28 am
ritesh (2/27/2009)
Thanks for the reply that worked. But yet i wanted to know why database go in these modes(single user/recovery/suspect) and how to get rid of these situation.Any information is appreciated. Thanks
Single user because someone executed ALTER DATABASE ... SET SINGLE USER
In Recovery usually because of a DB restore, executing BACKUP LOG ... WITH NORECOVERY, or if auto_close is on, a problem opening the log file
Suspect, a variety of reasons. Check the error log for details.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply