dbo.QBM_TDQBMRelation
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-CommonPrepropTable / QBM_ZPrePropTable at line 6
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QBMRelation
Typed Edges
- queues DBQueue task QBM_ZPrePropTable at line 6 Bulk DBQueue insert -> QBM-K-CommonPrepropTable / QBM_ZPrePropTable at line 6
- trigger on table QBMRelation Trigger parent table: QBMRelation
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QBM_TDQBMRelation2 ON QBMRelation FOR3DELETE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM deleted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw15 INSERT INTO @DBQueueElements_01(object,16 subobject,17 genprocid)18 SELECT19 x.uid,20 NULL,21 @GenProcID22 FROM(23 SELECT t.TableName AS UID24 FROM deleted d25 JOIN DialogColumn c26 ON d.UID_ParentColumn = c.UID_DialogColumn27 JOIN DialogTable t28 ON c.UID_DialogTable = t.UID_DialogTable29 WHERE30 d.ParentExecuteBy IN('T', 'D')31 UNION32 SELECT t.TableName AS UID33 FROM deleted d34 JOIN DialogColumn c35 ON d.UID_ChildColumn = c.UID_DialogColumn36 JOIN DialogTable t37 ON c.UID_DialogTable = t.UID_DialogTable38 WHERE39 d.ParentExecuteBy IN('T', 'D')) AS x40 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTable',41 @DBQueueElements_0142 END TRY43 BEGIN CATCH44 EXEC QBM_PSessionErrorAdd DEFAULT45 RAISERROR('',46 18,47 1)48 WITH NOWAIT49 END CATCH50END
Open raw exported source
1 create trigger QBM_TDQBMRelation on QBMRelation for Delete not for Replication as begin BEGIN TRY if exists (select top 1 1 from deleted) 2goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @DBQueueElements_01 QBM_YDBQueueRaw insert3 into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select t.TableName as UID from deleted d join DialogColumn4 c on d.UID_ParentColumn = c.UID_DialogColumn join DialogTable t on c.UID_DialogTable = t.UID_DialogTable where d.ParentExecuteBy in ('T', 'D') union 5select t.TableName as UID from deleted d join DialogColumn c on d.UID_ChildColumn = c.UID_DialogColumn join DialogTable t on c.UID_DialogTable = t.UID_DialogTable6 where d.ParentExecuteBy in ('T', 'D') ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTable', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd7 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 8