Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 what is single usermode?

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-03-13 : 02:02:57
Dear Experts,
while i'm practicing DBCC commands, it is saying the database should be in single user mode. how can i change my database with ALTER Database command?

and what are other modes of a database?

thank you very much

Vinod

Kristen
Test

22859 Posts

Posted - 2007-03-13 : 04:10:36
The ones I have in my Snippets file are:

ALTER DATABASE MyDatabaseName SET SINGLE_USER
ALTER DATABASE MyDatabaseName SET RESTRICTED_USER
ALTER DATABASE MyDatabaseName SET MULTI_USER

ALTER DATABASE MyDatabaseName SET OFFLINE

ALTER DATABASE MyDatabaseName SET READ_WRITE
ALTER DATABASE MyDatabaseName SET READ_ONLY

you can add

WITH ROLLBACK IMMEDIATE

if your command is blocked by other connections and you want to FORCE the command through

Kristen
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-03-13 : 04:47:17
Thank you verymuch kiristen

Vinod
Go to Top of Page
   

- Advertisement -