473,473 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dropping an active connection on an attached database

Why in the hell doesn't SQL Server provide a facility for dropping an
active connection on an attached database in SQL Server Management
console? I can't detach an attached database because apparently there
is an active connection.

I know you can use SSEUTIL but it seems like kluge for a poorly
thought out function.

Crazy

Jan 9 '08 #1
2 4144
Crazy Cat (da******@hotmail.com) writes:
Why in the hell doesn't SQL Server provide a facility for dropping an
active connection on an attached database in SQL Server Management
console? I can't detach an attached database because apparently there
is an active connection.
ALTER DATABASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jan 9 '08 #2
On Jan 9, 5:40 pm, Erland Sommarskog <esq...@sommarskog.sewrote:
Crazy Cat (danbr...@hotmail.com) writes:
Why in the hell doesn't SQL Server provide a facility for dropping an
active connection on an attached database in SQL Server Management
console? I can't detach an attached database because apparently there
is an active connection.

ALTER DATABASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE

--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se

Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Thanks Erland, I'll give it a try.

You are the man!

Crazy
Jan 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hank Reed | last post by:
Every morning a script starts up one of my network PCs at 5:00 AM. The first PC on the database each day runs compression and backup. Works great. A problem occurs if one PC did not shut down the...
13
by: Javier Gomez | last post by:
Is it posible to change by code (in a form) the active .mdw by another one ? When I open the DB I have the system.mdw active after some procesess I need to change to another secure.mdw and make...
3
by: djozy | last post by:
Please,I have made database in Sql server. How to connect with it? It is,lets say,in C:\temp and its name is database1. What do I need to put here: SqlConnection conn=new SqlConnection("Data...
17
by: Danieltbt05 | last post by:
just installed SQL server 2000 and using my client , i can't locate the server. I used SQL query analyzer to search but no servers were found. Error message is as below Server : Msg17,level...
7
by: Lau Lei Cheong | last post by:
Hello, Actually I think I should have had asked it long before, but somehow I haven't. Here's the scenerio: Say we have a few pages in an ASP.NET project, each of them needs to connect to...
1
by: Roger Hembury | last post by:
Hi All, Hope you can help / point me in the right direction with a little problem. I have a VB6 created active X dll which is downloaded to the client using <object> </object> so that I can...
2
by: Venkata Narayana | last post by:
Hi, You all may be knowing that Connection.isClosed() does not tells us if the underying DB connection is active or not; it only checks if Connection.close() had been previously called or not....
2
by: jason.m.ho | last post by:
Hello! I am trying to build an ajax chat system. Currently I have it so that when you chat, you upload your message to the database, and each client is polling that database to see if he/she has...
1
by: Aykut Canturk | last post by:
Can I use SqlExpress2005 AttachDatabase feature with classic ADO connections in my .asp pages ? But I need ConnectionString. Although I searched the web for couple of weeks I still coulnd't find...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.