Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for connections in SQL server (and close them)
Message
From
08/09/2005 14:19:13
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Check for connections in SQL server (and close them)
Environment versions
Database:
MS SQL Server
Miscellaneous
Thread ID:
01047812
Message ID:
01047812
Views:
58
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.
Next
Reply
Map
View

Click here to load this message in the networking platform