﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / Unable to set ShareWebDb back to MULTI_USER and ONLINE / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 06:07:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Unable to set ShareWebDb back to MULTI_USER and ONLINE</title><link>http://www.sqlservercentral.com/Forums/Topic1410590-146-1.aspx</link><description>Restore from backup would be the only way now I am guessing due to repair_allow_data_loss being run and terminated.</description><pubDate>Wed, 23 Jan 2013 07:49:27 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>Unable to set ShareWebDb back to MULTI_USER and ONLINE</title><link>http://www.sqlservercentral.com/Forums/Topic1410590-146-1.aspx</link><description>- We had an issue with ShareWebDb where we lost access to companyweb because the 'user' was unable to login. I checked the status of the database and it was in SUSPECT status.- As a result of my lack of experience with MS SQL I searched for a solution to this and after attempting several methods found with no success (setting Auto Close etc...) I ended up running the following that I found on a blog about fixing the lack of access to the companyweb;-- CHECK THE STATUS OF THE DATABASE	-- SELECT DATABASEPROPERTYEX('ShareWebDb', 'STATUS') as 'DBStatus'-- IF DATABASE IS 'SUSPECT' set to 'emergency'	 -- ALTER DATABASE ShareWebDb SET EMERGENCY-- Set database to single user mode to run checkdb utility	-- ALTER DATABASE ShareWebDb SET SINGLE_USER WITH ROLLBACK IMMEDIATE-- run the checkdb command	-- DBCC CHECKDB (ShareWebDb, REPAIR_ALLOW_DATA_LOSS)-- Set database back to Multi User mode   -- ALTER DATABASE ShareWebDb SET MULTI_USER WITH ROLLBACK IMMEDIATEI 'NOW' know that running DBCC CHECKDB (ShareWebDb, REPAIR_ALLOW_DATA_LOSS) was a huge newbie mistake.After having it run for 4 days on a 500MB database i 'cancelled' it. This then took another two days of backing out and did not complete before I lost patience and checked the status and found it was suspended. I therefore rebooted the server last night.  Now when I try and access the ShareWebDb that is still in SINGLE USER MODE and EMERGENCY status I get an error stating that it is already open in SINGLE USER MODE and cannot be accessed.I did some digging and determined the SPID of the process but the 'cmd' of this process is  "AWAITING COMMAND" and therefore, based on some more looking around and a now extreme sense of caution, I know that using a 'kill' on this spid could/will result in me digging a deeper hole for myself.Because this process has taken so many days my last backup is now several days old so I would prefer to bring the existing database back online of at all possible.Does anyone have any suggestions as to how I can get this database back online?Thanks in advance for your time and patience. </description><pubDate>Wed, 23 Jan 2013 07:46:16 GMT</pubDate><dc:creator>mjjordan</dc:creator></item></channel></rss>