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

DBCC CHECKDB & Single User Mode Expand / Collapse
Author
Message
Posted Wednesday, May 17, 2006 5:17 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 5, 2011 9:57 AM
Points: 78, Visits: 25

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




Post #280641
Posted Wednesday, May 17, 2006 6:43 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 5, 2011 9:57 AM
Points: 78, Visits: 25

Sorted it out !

Use database_name
GO

ALTER DATABASE database_name SET SINGLE_USER
GO

DBCC CHECKDB('database_name', REPAIR_REBUILD)
GO

Thanks...Mike




Post #280664
Posted Tuesday, November 28, 2006 11:25 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, November 4, 2013 2:38 PM
Points: 53, Visits: 37

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...
Post #326289
Posted Wednesday, November 29, 2006 2:46 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 5, 2011 9:57 AM
Points: 78, Visits: 25

Thank you for the update, greatly appreciated.
Mike

 




Post #326317
Posted Wednesday, July 9, 2008 3:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 13, 2009 12:05 PM
Points: 3, Visits: 4
Thanks to you both. This saved me from disaster.

Rurik
Post #531267
Posted Monday, August 26, 2013 1:17 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 10:52 AM
Points: 202, Visits: 354
repair_rebuild didn't fix any errors.
what must be the next step?
Post #1488301
Posted Monday, August 26, 2013 1:28 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 29, 2014 7:50 AM
Points: 2,262, Visits: 2,725
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’! **
Post #1488305
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse