Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close all connections to a database
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01306154
Message ID:
01306158
Vues:
6
>Is there a T-SQL command I can use to close all connections to a database? I want to use the command before I DROP DATABASE MyDb.
>
>Thanks,
>Einar

There is a database setting that automatically closes unused tables. Check ALTER DATABASE command for all the possible settings.

Also I just found an answer by googling:


ALTER DATABASE databaseName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE


or

http://www.experts-exchange.com/Database/Miscellaneous/Q_21314163.html?query=sql+server+force+connections+closed&clearTAFilter=true
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform