1 2 3 4 5 6 7 8 9 10 11
| USE yxhis
GO
SELECT distinct 'kill '+CONVERT (VARCHAR, req_spid) AS 处置方法, CONVERT (SMALLINT, req_spid) AS spid, rsc_dbid AS dbid, rsc_objid AS ObjId, rsc_indid AS IndId FROM master.dbo.syslockinfo WHERE rsc_objid IN(SELECT id FROM yxhis..sysobjects WHERE NAME IN('tbsysparam','tbsysparam2'))
|