Back to OIM Explorer

dbo.TSB_TDUNSGroupB

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on UNSGroupB. Bulk DBQueue insert -> TSB-K-PersonHasObject / TSB_ZPersonHasObject at line 6; References QBM_PDBQueueInsert_Bulk; Trigger parent table: UNSGroupB

Source: sandbox-db sys.sql_modules

Source size: 1.053 characters

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 6
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: UNSGroupB

Typed Edges

  • queues DBQueue task TSB_ZPersonHasObject at line 6 Bulk DBQueue insert -> TSB-K-PersonHasObject / TSB_ZPersonHasObject at line 6
  • trigger on table UNSGroupB Trigger parent table: UNSGroupB
  • 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

Complete Source

SQL52 lines
1CREATE trigger TSB_TDUNSGroupB2  ON UNSGroupB 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 a.uid_person AS uid24    FROM deleted d25    JOIN UNSaccountBinUNSGroupB aig26      ON d.uid_UNSGroupB = aig.uid_UNSGroupB AND aig.XOrigin > 027    JOIN UNSaccountB a28      ON aig.uid_UNSaccountB = a.uid_UNSaccountB29    WHERE30      a.uid_person > ' '31    UNION32    SELECT a.uid_person AS uid33    FROM deleted d34    JOIN UNSAccountBHasUNSGroupB aig35      ON d.uid_UNSGroupB = aig.uid_UNSGroupB AND aig.XOrigin > 036    JOIN UNSaccountB a37      ON aig.uid_UNSaccountB = a.uid_UNSaccountB38    WHERE39      a.uid_person > ' ') AS x40    EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject',41      @DBQueueElements_0142  END TRY43  BEGIN CATCH44    EXEC QBM_PSessionErrorAdd DEFAULT45    RAISERROR('',46    18,47    1)48      WITH NOWAIT49  END CATCH50  ende:51  RETURN52END
Open raw exported source
SQL ยท Raw8 lines
1create   trigger TSB_TDUNSGroupB on UNSGroupB  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  a.uid_person as uid from deleted d join UNSaccountBinUNSGroupB4 aig on d.uid_UNSGroupB = aig.uid_UNSGroupB and aig.XOrigin > 0  join UNSaccountB a on aig.uid_UNSaccountB = a.uid_UNSaccountB  where a.uid_person5 > ' '  union select a.uid_person as uid from deleted d join UNSAccountBHasUNSGroupB aig on d.uid_UNSGroupB = aig.uid_UNSGroupB and aig.XOrigin6 > 0  join UNSaccountB a on aig.uid_UNSaccountB = a.uid_UNSaccountB  where a.uid_person > ' '  ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject'7, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 8