Tuesday, March 20, 2012

Connections to the DB

Hi,
Is there a way of finding if there are connections to a SQL Database with T-SQL?

I am writing a routine that will crate a copy of the main Database files and to do this i needed to make sure that there are no other uses connected before i Unattach the DB and copy the files.

It would also be useful if i can tell the end user which user are connected.select * from master.sys.syslogins
_

? www.carlop.com × carlop-dev.blogspot.com

sqlsql

No comments:

Post a Comment