Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

msdb database not REALLY in single user mode? Expand / Collapse
Author
Message
Posted Thursday, May 16, 2013 10:13 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, September 13, 2016 3:55 PM
Points: 551, Visits: 1,097
I've run the following commands:

Sp_configure 'allow updates', 1 
Reconfigure with override
GO
sp_resetstatus 'msdb'
GO
update master..sysdatabases set status = status | -32768
where name = 'msdb'
Sp_configure 'allow updates', 0
Reconfigure with override

DBCC checkdb(msdb)
ALTER DATABASE msdb SET SINGLE_USER

When I look at the properties for the database I see that it IS in single user mode and it's in standby/emergency mode but when I run the following command

DBCC CheckDB (msdb, REPAIR_ALLOW_DATA_LOSS)

I get the following error:

Msg 7919, Level 16, State 2, Line 2
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


Am I missing something? Is it not REALLY in single user mode?
Post #1453656
Posted Thursday, May 16, 2013 10:20 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:36 PM
Points: 14,468, Visits: 38,067
couldn't ALTER DATABASE msdb SET SINGLE_USER fail if other processes are in it?
does SQL2000 have WITH ROLLBACK IMMEDIATE?
ALTER DATABASE msdb SET SINGLE_USER WITH ROLLBACK IMMEDIATE



Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1453659
Posted Thursday, May 16, 2013 10:29 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, September 13, 2016 3:55 PM
Points: 551, Visits: 1,097
Both

ALTER DATABASE msdb SET SINGLE_USER

and

ALTER DATABASE msdb SET SINGLE_USER WITH ROLLBACK IMMEDIATE

return

Command(s) completed successfully.


but any attempt to run the dbcc command still gives me that same error. The disparity that I'm running into is the database property which states that msdb is in single user mode and yet still getting an error that it is not.
Post #1453663
Posted Thursday, May 16, 2013 10:40 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:44 PM
Points: 45,297, Visits: 43,512
Edit: SQL 2000....


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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1453671
Posted Thursday, May 16, 2013 10:43 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, September 13, 2016 3:55 PM
Points: 551, Visits: 1,097
Yeah, ok, I'm an idiot without my morning coffee.. forgot to restart the server in single user mode for the system tables.. I'll give that a go and let you folks know if there are additional issues.
Post #1453672
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse