dbo.QBM_TUQBMCEFDefinition
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 11
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QBMCEFDefinition
Typed Edges
- queues DBQueue task QBM_ZTriggerWatchCreate at line 11 Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 11
- trigger on table QBMCEFDefinition Trigger parent table: QBMCEFDefinition
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FSQTriggerPartCEF source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QBM_PSQLCheckExecutable source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_FSQTriggerPartCEF
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QBM_PSQLCheckExecutable
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QBM_TUQBMCEFDefinition2 ON QBMCEFDefinition FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @SQLToCheck QBM_YParameterList7 DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')8 BEGIN TRY9 IF EXISTS(10 SELECT TOP 1 111 FROM inserted)12 GOTO start13 IF EXISTS(14 SELECT TOP 1 115 FROM deleted)16 GOTO start17 RETURN start:18 IF19 UPDATE(UID_DialogTable) OR20 UPDATE(UID_DialogColumn) OR21 UPDATE(EventClassID) OR22 UPDATE(ActivityName) OR23 UPDATE(LogSeverity) OR24 UPDATE(MessageString) OR25 UPDATE(Param01) OR26 UPDATE(Param02) OR27 UPDATE(Param03) OR28 UPDATE(Param04) OR29 UPDATE(Param05) OR30 UPDATE(OperationType) OR31 UPDATE(IsInActive) OR32 UPDATE(WhereClause)33 BEGIN34 INSERT INTO @SQLToCheck(Parameter1,35 ContentFull)36 SELECT37 c.XObjectKey,38 dbo.QBM_FSQTriggerPartCEF(isnull(b.TableName, tv.TableName),39 c.OperationType,40 1)41 FROM inserted c42 JOIN DialogTable tv43 ON c.UID_DialogTable = tv.UID_DialogTable44 LEFT45 OUTER46 JOIN DialogTable b47 ON tv.UID_DialogTableBase = b.UID_DialogTable48 EXEC QBM_PSQLCheckExecutable @SQLToCheck,49 @RaiseError = 150 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw51 INSERT INTO @DBQueueElements_01(object,52 subobject,53 genprocid)54 SELECT55 x.uid,56 NULL,57 @GenProcID58 FROM(59 SELECT60 isnull(b.TableName, tv.TableName) AS uid61 FROM inserted c62 JOIN DialogTable tv63 ON c.UID_DialogTable = tv.UID_DialogTable64 LEFT65 OUTER66 JOIN DialogTable b67 ON tv.UID_DialogTableBase = b.UID_DialogTable68 UNION69 SELECT70 isnull(b.TableName, tv.TableName) AS uid71 FROM deleted c72 JOIN DialogTable tv73 ON c.UID_DialogTable = tv.UID_DialogTable74 LEFT75 OUTER76 JOIN DialogTable b77 ON tv.UID_DialogTableBase = b.UID_DialogTable) AS x78 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger',79 @DBQueueElements_0180 END81 END TRY82 BEGIN CATCH83 EXEC QBM_PSessionErrorAdd DEFAULT84 RAISERROR('',85 18,86 1)87 WITH NOWAIT88 END CATCH89 ende:90 RETURN91END
Open raw exported source
1create trigger QBM_TUQBMCEFDefinition on QBMCEFDefinition for Update not for Replication as begin declare @SQLToCheck QBM_YParameterList declare2 @GenProcID varchar(38) = dbo.QBM_FGISessionContext('') BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted3) goto start return start: if update(UID_DialogTable) or update(UID_DialogColumn) or update(EventClassID) or update(ActivityName) or update(LogSeverity4) or update(MessageString) or update(Param01) or update(Param02) or update(Param03) or update(Param04) or update(Param05) or update(OperationType) or update5(IsInActive) or update(WhereClause) begin insert into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey, dbo.QBM_FSQTriggerPartCEF(isnull(b.TableName6, tv.TableName ), c.OperationType, 1) from inserted c join DialogTable tv on c.UID_DialogTable = tv.UID_DialogTable left outer join DialogTable b on tv.UID_DialogTableBase7 = b.UID_DialogTable exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_018 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select isnull(b.TableName, tv.TableName ) as uid from inserted c join DialogTable9 tv on c.UID_DialogTable = tv.UID_DialogTable left outer join DialogTable b on tv.UID_DialogTableBase = b.UID_DialogTable union select isnull(b.TableName10, tv.TableName ) as uid from deleted c join DialogTable tv on c.UID_DialogTable = tv.UID_DialogTable left outer join DialogTable b on tv.UID_DialogTableBase11 = b.UID_DialogTable ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd12 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 13