msdb database not REALLY in single user mode?

  • 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?

  • 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!

  • 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.

  • 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
  • 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.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply