Back to OIM Explorer

dbo.ADS_TIADSContact

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on ADSContact. Bulk DBQueue insert -> ADS-K-PersonHasObject / ADS_ZPersonHasObject at line 4; Bulk DBQueue insert -> ADS-K-ADSContactInADSGroup / ADS_ZContactInADSGroup at line 4; Bulk DBQueue insert -> ADS-K-ADSContactInADSGroup / ADS_ZContactInADSGroup at line 6; References QBM_PDBQueueInsert_Bulk

Source: sandbox-db sys.sql_modules

Source size: 976 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 -> ADS-K-PersonHasObject / ADS_ZPersonHasObject at line 4
  • Bulk DBQueue insert -> ADS-K-ADSContactInADSGroup / ADS_ZContactInADSGroup at line 4
  • Bulk DBQueue insert -> ADS-K-ADSContactInADSGroup / ADS_ZContactInADSGroup at line 6
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: ADSContact

Typed Edges

  • queues DBQueue task ADS_ZPersonHasObject at line 4 Bulk DBQueue insert -> ADS-K-PersonHasObject / ADS_ZPersonHasObject at line 4
  • queues DBQueue task ADS_ZContactInADSGroup at line 4 Bulk DBQueue insert -> ADS-K-ADSContactInADSGroup / ADS_ZContactInADSGroup at line 4
  • queues DBQueue task ADS_ZContactInADSGroup at line 6 Bulk DBQueue insert -> ADS-K-ADSContactInADSGroup / ADS_ZContactInADSGroup at line 6
  • trigger on table ADSContact Trigger parent table: ADSContact
  • 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

SQL54 lines
1CREATE trigger ADS_TIADSContact2  ON ADSContact FOR3INSERT NOT FOR Replication4AS5BEGIN6  IF EXISTS(7    SELECT TOP 1 18    FROM inserted)9  GOTO start10  RETURN start:11  DECLARE @GenProcID varchar(38)12  BEGIN TRY13    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    SELECT24      DISTINCT uid_person AS uid25    FROM inserted26    WHERE27      uid_person > ' ') AS x28    EXEC QBM_PDBQueueInsert_Bulk 'ADS-K-PersonHasObject',29      @DBQueueElements_0130    DECLARE @DBQueueElements_02 QBM_YDBQueueRaw31    INSERT INTO @DBQueueElements_02(object,32    subobject,33    genprocid)34    SELECT35      x.uid,36      NULL,37      @GenProcID38    FROM(39    SELECT i.UID_ADSContact AS uid40    FROM inserted i41    WHERE42      i.UID_Person > ' ') AS x43    EXEC QBM_PDBQueueInsert_Bulk 'ADS-K-ADSContactInADSGroup',44      @DBQueueElements_0245  END TRY46  BEGIN CATCH47    EXEC QBM_PSessionErrorAdd DEFAULT48    RAISERROR('',49    18,50    1)51      WITH NOWAIT52  END CATCH53  RETURN54END
Open raw exported source
SQL ยท Raw8 lines
1    create   trigger ADS_TIADSContact on ADSContact  for Insert not for Replication as begin  if exists (select top 1 1 from inserted) goto start2 return start: declare @GenProcID varchar(38) BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext('')  declare @DBQueueElements_01 QBM_YDBQueueRaw 3insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct uid_person as uid from inserted where4 uid_person > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'ADS-K-PersonHasObject', @DBQueueElements_01  declare @DBQueueElements_02 QBM_YDBQueueRaw insert 5into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select i.UID_ADSContact as uid from inserted i where i.UID_Person6 > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'ADS-K-ADSContactInADSGroup', @DBQueueElements_02  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR7 ('', 18, 1) WITH NOWAIT END CATCH return end 8