dbo.TSB_TDUNSGroupB3InUNSGroupB3
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 -> TSB-K-UNSGroupB3InUNSGroupB3 / TSB_ZUNSGroupB3InUNSGroupB3 at line 8
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: UNSGroupB3InUNSGroupB3
Typed Edges
- queues DBQueue task TSB_ZUNSGroupB3InUNSGroupB3 at line 8 Bulk DBQueue insert -> TSB-K-UNSGroupB3InUNSGroupB3 / TSB_ZUNSGroupB3InUNSGroupB3 at line 8
- trigger on table UNSGroupB3InUNSGroupB3 Trigger parent table: UNSGroupB3InUNSGroupB3
- 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 source dbo.TSB_TDUNSGroupB source text reference
- references source dbo.TSB_TDUNSGroupB3 source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.TSB_TDUNSGroupB
- dbo.TSB_TDUNSGroupB3
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger TSB_TDUNSGroupB3InUNSGroupB32 ON UNSGroupB3InUNSGroupB3 FOR3DELETE NOT FOR Replication4AS5BEGIN6 IF EXISTS(7 SELECT TOP 1 18 FROM deleted)9 GOTO start10 RETURN start:11 BEGIN TRY12 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 uid_UNSGroupB3Parent AS uid24 FROM deleted25 UNION26 SELECT UID_UNSGroupB3Child27 FROM deleted28 UNION29 SELECT co.uid_UNSGroupB3Parent AS uid30 FROM deleted i31 JOIN UNSGroupB3collection co32 ON i.UID_UNSGroupB3Child = co.UID_UNSGroupB3Child33 UNION34 SELECT co.uid_UNSGroupB3Parent35 FROM deleted i36 JOIN UNSGroupB3collection co37 ON i.UID_UNSGroupB3Parent = co.UID_UNSGroupB3Child38 UNION39 SELECT co.UID_UNSGroupB3Child40 FROM deleted i41 JOIN UNSGroupB3collection co42 ON i.UID_UNSGroupB3Child = co.UID_UNSGroupB3Parent43 UNION44 SELECT co.UID_UNSGroupB3Child45 FROM deleted i46 JOIN UNSGroupB3collection co47 ON i.UID_UNSGroupB3Parent = co.UID_UNSGroupB3Parent) AS x48 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSGroupB3InUNSGroupB3',49 @DBQueueElements_0150 END TRY51 BEGIN CATCH52 EXEC QBM_PSessionErrorAdd DEFAULT53 RAISERROR('',54 18,55 1)56 WITH NOWAIT57 END CATCH58 ende:59 RETURN60END
Open raw exported source
1create trigger TSB_TDUNSGroupB3InUNSGroupB3 on UNSGroupB3InUNSGroupB3 for Delete not for Replication as begin if exists (select top 21 1 from deleted) goto start return start: BEGIN TRY declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @DBQueueElements_013 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select uid_UNSGroupB3Parent as 4uid from deleted union select UID_UNSGroupB3Child from deleted union select co.uid_UNSGroupB3Parent as uid from deleted i join UNSGroupB3collection5 co on i.UID_UNSGroupB3Child = co.UID_UNSGroupB3Child union select co.uid_UNSGroupB3Parent from deleted i join UNSGroupB3collection co on i.UID_UNSGroupB3Parent6 = co.UID_UNSGroupB3Child union select co.UID_UNSGroupB3Child from deleted i join UNSGroupB3collection co on i.UID_UNSGroupB3Child = co.UID_UNSGroupB3Parent7 union select co.UID_UNSGroupB3Child from deleted i join UNSGroupB3collection co on i.UID_UNSGroupB3Parent = co.UID_UNSGroupB3Parent ) as x exec8 QBM_PDBQueueInsert_Bulk 'TSB-K-UNSGroupB3InUNSGroupB3', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 189, 1) WITH NOWAIT END CATCH ende: return end 10