Disclaimer: I am a consultant at Amazon Web Services, and this is my personal blog. The opinions expressed here are solely mine and do not reflect the views of Amazon Web Services (AWS). Any statements made should not be considered official endorsements or statements by AWS.
Yesterday, when I was trying to delete my database from the web panel of GoDaddy hosting. I got this issue. I was not able to delete my database and I was being shown this message.
I just googled it and got the solution. I thought, it would be nice to share this with you all.
As the message indicates very clearly that there is some user which is still connected with database. That's why it is not allowing you to delete database. User might be connected to server either though any application or through SQL Server Management Studio.
First, find out the sessionId for your SQL user
SELECT session_id
FROM sys.dm_exec_sessions
WHERE login_name = 'ankushjain'
then kill that session using KILL command
KILL 85 -- 85 is just for demo, you may get some different.