dbo.TSB_TDUNSGroupB2InUNSGroupB2
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-UNSGroupB2InUNSGroupB2 / TSB_ZUNSGroupB2InUNSGroupB2 at line 8
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: UNSGroupB2InUNSGroupB2
Typed Edges
- queues DBQueue task TSB_ZUNSGroupB2InUNSGroupB2 at line 8 Bulk DBQueue insert -> TSB-K-UNSGroupB2InUNSGroupB2 / TSB_ZUNSGroupB2InUNSGroupB2 at line 8
- trigger on table UNSGroupB2InUNSGroupB2 Trigger parent table: UNSGroupB2InUNSGroupB2
- 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_TDUNSGroupB2 source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.TSB_TDUNSGroupB
- dbo.TSB_TDUNSGroupB2
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger TSB_TDUNSGroupB2InUNSGroupB22 ON UNSGroupB2InUNSGroupB2 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_UNSGroupB2Parent AS uid24 FROM deleted25 UNION26 SELECT UID_UNSGroupB2Child27 FROM deleted28 UNION29 SELECT co.uid_UNSGroupB2Parent AS uid30 FROM deleted i31 JOIN UNSGroupB2collection co32 ON i.UID_UNSGroupB2Child = co.UID_UNSGroupB2Child33 UNION34 SELECT co.uid_UNSGroupB2Parent35 FROM deleted i36 JOIN UNSGroupB2collection co37 ON i.UID_UNSGroupB2Parent = co.UID_UNSGroupB2Child38 UNION39 SELECT co.UID_UNSGroupB2Child40 FROM deleted i41 JOIN UNSGroupB2collection co42 ON i.UID_UNSGroupB2Child = co.UID_UNSGroupB2Parent43 UNION44 SELECT co.UID_UNSGroupB2Child45 FROM deleted i46 JOIN UNSGroupB2collection co47 ON i.UID_UNSGroupB2Parent = co.UID_UNSGroupB2Parent) AS x48 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSGroupB2InUNSGroupB2',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_TDUNSGroupB2InUNSGroupB2 on UNSGroupB2InUNSGroupB2 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_UNSGroupB2Parent as 4uid from deleted union select UID_UNSGroupB2Child from deleted union select co.uid_UNSGroupB2Parent as uid from deleted i join UNSGroupB2collection5 co on i.UID_UNSGroupB2Child = co.UID_UNSGroupB2Child union select co.uid_UNSGroupB2Parent from deleted i join UNSGroupB2collection co on i.UID_UNSGroupB2Parent6 = co.UID_UNSGroupB2Child union select co.UID_UNSGroupB2Child from deleted i join UNSGroupB2collection co on i.UID_UNSGroupB2Child = co.UID_UNSGroupB2Parent7 union select co.UID_UNSGroupB2Child from deleted i join UNSGroupB2collection co on i.UID_UNSGroupB2Parent = co.UID_UNSGroupB2Parent ) as x exec8 QBM_PDBQueueInsert_Bulk 'TSB-K-UNSGroupB2InUNSGroupB2', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 189, 1) WITH NOWAIT END CATCH ende: return end 10