select top 1 listenerId from tbl_SYS_EventListeners with (nolock) where ownerId = and ownerType = and eventName = insert into tbl_SYS_Events ( ownerId, ownerType, eventName, eventTime, eventUserId, eventSubjectId, eventSubjectType, eventData, eventFormat, serverName , laTxId , async , callStack ) values ( , , , , , , , , 'WDDX', , , 1 , )