PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Dropping an active connection on an attached database
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Dropping an active connection on an attached database

Réponse
 
LinkBack Outils de la discussion
Vieux 09/01/2008, 18h42   #1
Crazy Cat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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



  Réponse avec citation
Vieux 09/01/2008, 22h40   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dropping an active connection on an attached database

Crazy Cat (danbredy@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, esquel@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
  Réponse avec citation
Vieux 15/01/2008, 14h46   #3
Crazy Cat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Dropping an active connection on an attached database

On Jan 9, 5:40 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> 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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h35.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09048 seconds with 11 queries