What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 37655 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > SQL Server > Remove SQL Server database from single-user mode to Multi-User Mode ...
Kapildalke

Remove SQL Server database from single-user mode to Multi-User Mode

 Code Snippet posted by: Kapildalke | Posted on: 5/26/2012 | Category: SQL Server Codes | Views: 1451 | Status: [Member] | Points: 40 | Alert Moderator   


This query should be executed in Master Database(System Database)...
select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame
from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid
where d.name = 'db_Name'
GO

kill sp_id

exec sp_dboption 'db_Name', 'single user', 'FALSE'
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 10:31:52 AM