miércoles, 9 de febrero de 2011

Auditoria de Bloqueos en SQL Server 2000

Este query es una mutación del sp_lock, que agrega algunos datos que el SP_LOCK no muestra.


Util para detectar Dead locks.







SELECT
/*req_spid As spid,
rsc_dbid As dbid,
rsc_objid As ObjId,
rsc_indid As IndId,
*/ p.loginame As [SqlUser],
p.nt_username As [WinUser],p.program_name As [Client],p.hostname As [Host] ,p.cmd As [SqlCommand],p.status AS [Status],db_name(rsc_dbid) As [Database],object_name(rsc_objid) As [object],
substring (v.name, 1, 4) As [Type],
substring (rsc_text, 1, 16) As [Resource],substring (u.name, 1, 8) As [Mode],substring (x.name, 1, 5) As [Status],p.net_library AS [net_library]FROMmaster.dbo.syslockinfo with(nolock),
master.dbo.spt_values v with(nolock),
master.dbo.spt_values x with(nolock),master.dbo.spt_values u with(nolock),master.dbo.sysprocesses p with(nolock)WHERE p.spid=req_spidand master.dbo.syslockinfo.rsc_type = v.numberand v.type = 'LR'and master.dbo.syslockinfo.req_status = x.numberand x.type = 'LS'and master.dbo.syslockinfo.req_mode + 1 = u.numberand u.type = 'L'and object_name(rsc_objid) is not null
ORDER BY spid, object, Type

Transacciones Fiori

  /UI2/CACHE Register service for UI2 cache use /UI2/CACHE_DEL Delete cache entries /UI2/CHIP Chip Registration /UI2/CUST Customizing of UI ...