Question:

Change SQL server2005 database from mixed mode to single user mode so as to run DBCC CHECKDB (REPAIR_REBUILD)?

by  |  earlier

0 LIKES UnLike

Or any other way I can run this command on a mixed mode installation successfully

 Tags:

   Report

1 ANSWERS


  1. You can do it several ways ... from Management Studio or a procedure.  From Management Studio, right-click on the database, click Properties.  Click on Options, scroll down under State and change the Restrict Access to what you need.

    Or you can run one of these two lines:

    ALTER DATABASE [DatabaseName] SET SINGLE_USER WITH NO_WAIT

    EXEC sp_dboption 'DatabaseName', 'single user', 'true'

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.