Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for connections in SQL server (and close them)
Message
De
08/09/2005 14:19:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Check for connections in SQL server (and close them)
Versions des environnements
Database:
MS SQL Server
Divers
Thread ID:
01047812
Message ID:
01047812
Vues:
56
I'm writing a little utility which should notice when a fresh .bak file (containing a backup of a remote database) has appeared in a directory, and then restore the database from it.

The problem here is that if there are active connections to the database, the restore will fail. Is there any stored procedure in SQL server which would return the number of such connections (apart from my own connection, that is)? Also, is there a way to close such connections?

I know there must be something, because I can do that from Enterprise Manager, but I haven't found any such procedure or function in the books online. Could it be this is some heavy internal stuff that only EManager can access?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform