dbo.QBM_TIQBMCEFDefinition
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 7
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QBMCEFDefinition
Typed Edges
- queues DBQueue task QBM_ZTriggerWatchCreate at line 7 Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 7
- 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_TIQBMCEFDefinition2 ON QBMCEFDefinition FOR3INSERT NOT FOR Replication4AS5BEGIN6 DECLARE @SQLToCheck QBM_YParameterList7 BEGIN TRY8 IF EXISTS(9 SELECT TOP 1 110 FROM inserted)11 GOTO start12 RETURN start:13 DECLARE @GenProcID varchar(38)14 SELECT @GenProcID = dbo.QBM_FGISessionContext('')15 INSERT INTO @SQLToCheck(Parameter1,16 ContentFull)17 SELECT18 c.XObjectKey,19 dbo.QBM_FSQTriggerPartCEF(isnull(b.TableName, tv.TableName),20 c.OperationType,21 1)22 FROM inserted c23 JOIN DialogTable tv24 ON c.UID_DialogTable = tv.UID_DialogTable25 LEFT26 OUTER27 JOIN DialogTable b28 ON tv.UID_DialogTableBase = b.UID_DialogTable29 EXEC QBM_PSQLCheckExecutable @SQLToCheck,30 @RaiseError = 131 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw32 INSERT INTO @DBQueueElements_01(object,33 subobject,34 genprocid)35 SELECT36 x.uid,37 NULL,38 @GenProcID39 FROM(40 SELECT41 DISTINCT isnull(b.TableName, tv.TableName) AS uid42 FROM inserted c43 JOIN DialogTable tv44 ON c.UID_DialogTable = tv.UID_DialogTable45 LEFT46 OUTER47 JOIN DialogTable b48 ON tv.UID_DialogTableBase = b.UID_DialogTable) AS x49 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger',50 @DBQueueElements_0151 END TRY52 BEGIN CATCH53 EXEC QBM_PSessionErrorAdd DEFAULT54 RAISERROR('',55 18,56 1)57 WITH NOWAIT58 END CATCH59END
Open raw exported source
1 create trigger QBM_TIQBMCEFDefinition on QBMCEFDefinition for Insert not for Replication as begin declare @SQLToCheck QBM_YParameterList2 BEGIN TRY if exists (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') insert into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey, dbo.QBM_FSQTriggerPartCEF(isnull(b.TableName, tv.TableName ), c.OperationType4, 1) from inserted c join DialogTable tv on c.UID_DialogTable = tv.UID_DialogTable left outer join DialogTable b on tv.UID_DialogTableBase = b.UID_DialogTable5 exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject6, genprocid) select x.uid, null, @GenProcID from ( select distinct isnull(b.TableName, tv.TableName ) as uid from inserted c join DialogTable tv on c.UID_DialogTable7 = tv.UID_DialogTable left outer join DialogTable b on tv.UID_DialogTableBase = b.UID_DialogTable ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger'8, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 9