In my production SQL Server 2016 server,i had few dummy databases created as part of migrating from SQL Server 2008.
I was cleaning up all the unwanted databases and i dropped few databases.But when i tried to drop an unused database ,i get the error message "Cannot drop the database as it is currently in use".
So i checked the process/session using that database.
I see that spid 144
uses it and when i did DBCC INPUTBUFFER(144)
,i see an Event Type as Language Event
.
I am not sure what it means.
I tried to kill the spid earlier ,but in few seconds a new session started and i am still not able to drop that database.
This particular database is not in use for atleast 6 months now and that is why i tried to KILL the process using that db,cause i was sure that it won;t affect any.
Any idea why a new session is getting created and the database is always in use.
DBCC INPUTBUFFER
documentation?Language Event
.