DBCC INPUTBUFFER shows Event Type as Language Event for an unused Database
Your session has a connection context to the database. In order to drop a database, you need to remove all connections (including your own query window &amp; Object Explorer connections):

USE master;
GO
ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
DROP DATABASE dbname;


(See also this question.)

This is much cleaner and immediate than playing KILL-a-spid (whack-a-mole) for individual sessions and hoping you get your alter in before another session establishes connectivity.

We can't tell you why this session is getting created, something that is calling dtb.compat... which isn't anything built into SQL Server, so it must be a user or some application. You can get more detail when you catch this query in the act, like host name, app name, and other details, by looking at sys.dm_exec_connections, sys.dm_exec_connections, sys.dm_exec_requests, etc.

Your query against sysprocesses is problematic for two reasons. (1) dbid there is unreliable. A session can definitely hold locks against a database with a different dbid indicated there (think cross-database joins). (2) sysprocesses is deprecated:



As for the Language Event question, this just means that the last command that session sent to SQL Server was query text. The other option (other than No Event) is an RPC Event, which in simplest terms means a procedure call. See the DBCC INPUTBUFFER topic in the documentation for more details.