dbo.TSB_TIUNSAccountBHasUNSItemB
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-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: UNSAccountBHasUNSItemB
Typed Edges
- queues DBQueue task TSB_ZUNSAccountBHasUNSItemB at line 5 Bulk DBQueue insert -> TSB-K-UNSAccountBHasUNSItemB / TSB_ZUNSAccountBHasUNSItemB at line 5
- trigger on table UNSAccountBHasUNSItemB Trigger parent table: UNSAccountBHasUNSItemB
- references source dbo.QBM_FGIBitPatternXOrigin source text reference
- 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_TIUNSAccountB source text reference
References
- dbo.QBM_FGIBitPatternXOrigin
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.TSB_TIUNSAccountB
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger TSB_TIUNSAccountBHasUNSItemB2 ON UNSAccountBHasUNSItemB FOR3INSERT NOT FOR Replication4AS5BEGIN6 DECLARE @QBM_BitPatternXOrigin_Inherit_inv int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|',7 1)8 BEGIN TRY9 IF EXISTS(10 SELECT TOP 1 111 FROM inserted)12 GOTO start13 RETURN start:14 DECLARE @GenProcID varchar(38)15 SELECT @GenProcID = dbo.QBM_FGISessionContext('')16 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw17 INSERT INTO @DBQueueElements_01(object,18 subobject,19 genprocid)20 SELECT21 x.uid,22 NULL,23 @GenProcID24 FROM(25 SELECT26 DISTINCT i.UID_UNSAccountB AS uid27 FROM inserted i28 WHERE29 i.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv > 0) AS x30 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBHasUNSItemB',31 @DBQueueElements_0132 END TRY33 BEGIN CATCH34 EXEC QBM_PSessionErrorAdd DEFAULT35 RAISERROR('',36 18,37 1)38 WITH NOWAIT39 END CATCH40 ende:41 RETURN42END
Open raw exported source
1 create trigger TSB_TIUNSAccountBHasUNSItemB on UNSAccountBHasUNSItemB for Insert not for Replication as begin declare @QBM_BitPatternXOrigin_Inherit_inv2 int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 1) BEGIN TRY if exists (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar3(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, 4genprocid) select x.uid, null, @GenProcID from ( select distinct i.UID_UNSAccountB as uid from inserted i where i.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv5 > 0 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBHasUNSItemB', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR6 ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7