I was trying to rename a database and it said that it needed to be exclusively locked to perform this operation ...
How can I check who is connected to it?
I was trying to rename a database and it said that it needed to be exclusively locked to perform this operation ...
How can I check who is connected to it?
If I recall correctly in 2005 you can type this in a new query and then execute it:
it will probably work in 2008.
Yes, it will: http://msdn.microsoft.com/en-us/library/ms174313.aspx
You can use the Activity Monitor in SQL Server Management Studio. Once it's open look at the Processes section to see what is running, the login, database being used, and other helpful information.
I think to check number of active connections and their Databases, please use:
You can use a built in sql stored procedure.
exec sp_who go