declare @did int
select @did=request_session_id from sys.dm_tran_locks where resource_type = 'OBJECT' and resource_database_id =DB_ID('数据库名') kill @did