DBCC CHECKDB & Single User Mode

  • mdouglass

    Default port

    Points: 1412

    Hi,

    I have ran the command DBCC CHECKDB ('database name', REPAIR_REBUILD) to correct 3 consistancy errors in a table.

    I have placed the server in single user-mode i.e.

    Stopped all SQL Services, from the CMD Prompt <directory name>\sqlservr.exe -c -m

    Went to Query Analyser to execute the command again and it tells me that it needs to be in single user-mode ! It is !!!!!

    Any ideas?

    Thanks.

    Mike

  • mdouglass

    Default port

    Points: 1412

    Sorted it out !

    Use database_name

    GO

    ALTER DATABASE database_name SET SINGLE_USER

    GO

    DBCC CHECKDB('database_name', REPAIR_REBUILD)

    GO

    Thanks...Mike

  • Pankaj Khanna

    Say Hey Kid

    Points: 687

    Your database will remain in single-user modfe only.

    to return to multi-user mode:

    ALTER <database-name> SET MULTI_USER

     

    Pankaj Khanna
    Database Administrator - SQL Server 2000

    Keep hope to keep you intact...

  • mdouglass

    Default port

    Points: 1412

    Thank you for the update, greatly appreciated.

    Mike

     

  • Rurik Spence

    Valued Member

    Points: 67

    Thanks to you both. This saved me from disaster.

    Rurik

  • Benki Chendu

    SSCrazy Eights

    Points: 8051

    repair_rebuild didn't fix any errors.

    what must be the next step?

  • HanShi

    SSC-Dedicated

    Points: 33239

    Benki Chendu (8/26/2013)


    repair_rebuild didn't fix any errors.

    what must be the next step?

    This thread is from a few years ago.

    Please start a new thread and post your error messages encountered by the CHECKDB and describe the actions yyou have taken sofar.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 7 posts - 1 through 7 (of 7 total)

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