Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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, December 9, 2014 10:32 AM
Points: 546, Visits: 1,063
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: Yesterday @ 9:31 AM
Points: 12,962, Visits: 32,501
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
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, December 9, 2014 10:32 AM
Points: 546, Visits: 1,063
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 @ 1:21 AM
Points: 40,617, Visits: 37,082
Edit: SQL 2000....


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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, December 9, 2014 10:32 AM
Points: 546, Visits: 1,063
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