Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
6  
You've asked eight SQL 2008 questions since yesterday. It's great you're an active member here on SF, but perhaps you should ask which training materials would best assist you in learning SQL 2008? –  jscott Oct 28 '10 at 20:07

2 Answers 2

up vote 7 down vote accepted

If I recall correctly in 2005 you can type this in a new query and then execute it:

exec sp_who
go

it will probably work in 2008.

Yes, it will: http://msdn.microsoft.com/en-us/library/ms174313.aspx

share|improve this answer
2  
Additionally, sp_who2 will give you more information than sp_who. –  joeqwerty Oct 29 '10 at 1:03
    
awesome! thanks for the tip. –  natxo asenjo Oct 29 '10 at 6:05

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.