by
0
3
334
0
Top 10% !
Popular
Specified
Popularity: 1241601st place

Published on:

No tags for this snippet yet.
LanguageSQL
SourceGitHub

Set SQL database to single user mode

Set SQL database to single user mode: 
database_single_user.sql
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1677155/Set-SQL-database-to-single-user-mode?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
USE master; GO ALTER DATABASE AdventureWorks2012 SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO ALTER DATABASE AdventureWorks2012 SET READ_ONLY; GO ALTER DATABASE AdventureWorks2012 SET MULTI_USER; GO
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus