dbo.TSB_TDTSBPersonUsesAccount
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-PersonHasObject / TSB_ZPersonHasObject at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: TSBPersonUsesAccount
Typed Edges
- queues DBQueue task TSB_ZPersonHasObject at line 5 Bulk DBQueue insert -> TSB-K-PersonHasObject / TSB_ZPersonHasObject at line 5
- trigger on table TSBPersonUsesAccount Trigger parent table: TSBPersonUsesAccount
- references source dbo.QBM_FGIConfigparmValue 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
- dbo.QBM_FGIConfigparmValue
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger TSB_TDTSBPersonUsesAccount2 ON TSBPersonUsesAccount FOR3DELETE NOT FOR Replication4AS5BEGIN6 IF EXISTS(7 SELECT TOP 1 18 FROM deleted)9 GOTO start10 RETURN start:11 DECLARE @GenProcID varchar(38)12 BEGIN TRY13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 IF '1' = dbo.QBM_FGIConfigparmValue('QER\ComplianceCheck\IncludeTSBPersonUsesAccount')15 BEGIN16 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 uid_person AS uid27 FROM deleted28 WHERE29 ObjectKeyAccount LIKE '<Key><T>UNSAccountB</T>%') AS x30 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject',31 @DBQueueElements_0132 END33 END TRY34 BEGIN CATCH35 EXEC QBM_PSessionErrorAdd DEFAULT36 RAISERROR('',37 18,38 1)39 WITH NOWAIT40 END CATCH41 RETURN42END
Open raw exported source
1create trigger TSB_TDTSBPersonUsesAccount on TSBPersonUsesAccount for Delete not for Replication as begin if exists (select top 1 1 from deleted2) goto start return start: declare @GenProcID varchar(38) BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext('') if '1' = dbo.QBM_FGIConfigparmValue3('QER\ComplianceCheck\IncludeTSBPersonUsesAccount') begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject4, genprocid) select x.uid, null, @GenProcID from ( select distinct uid_person as uid from deleted where ObjectKeyAccount like '<Key><T>UNSAccountB</T>%'5 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR (6'', 18, 1) WITH NOWAIT END CATCH return end 7