Back to OIM Explorer

dbo.ADS_TIADSMachine

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on ADSMachine. Bulk DBQueue insert -> ADS-K-ADSMachineInADSGroup / ADS_ZADSMachineInADSGroup at line 5; References QBM_PDBQueueInsert_Bulk; Trigger parent table: ADSMachine

Source: sandbox-db sys.sql_modules

Source size: 867 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-ADSMachineInADSGroup / ADS_ZADSMachineInADSGroup at line 5
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: ADSMachine

Typed Edges

  • queues DBQueue task ADS_ZADSMachineInADSGroup at line 5 Bulk DBQueue insert -> ADS-K-ADSMachineInADSGroup / ADS_ZADSMachineInADSGroup at line 5
  • trigger on table ADSMachine Trigger parent table: ADSMachine
  • 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

SQL49 lines
1CREATE trigger ADS_TIADSMachine2  ON ADSMachine FOR3INSERT NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM inserted)10    GOTO start11    RETURN start:12    DECLARE @GenProcID varchar(38)13    SELECT @GenProcID = dbo.QBM_FGISessionContext('')14    IF EXISTS(15      SELECT TOP 1 116      FROM ADSOtherSID a17      JOIN inserted d18        ON a.ObjectSID = d.ObjectSID)19    BEGIN20      DELETE ADSOtherSID21      WHERE22        objectSID IN(23      SELECT ObjectSID24      FROM inserted) AND UID_ADSOtherSID NOT LIKE 'ADS-%'25    END26    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw27    INSERT INTO @DBQueueElements_01(object,28    subobject,29    genprocid)30    SELECT31      x.uid,32      NULL,33      @GenProcID34    FROM(35    SELECT uid_ADSMachine AS uid36    FROM inserted i) AS x37    EXEC QBM_PDBQueueInsert_Bulk 'ADS-K-ADSMachineInADSGroup',38      @DBQueueElements_0139  END TRY40  BEGIN CATCH41    EXEC QBM_PSessionErrorAdd DEFAULT42    RAISERROR('',43    18,44    1)45      WITH NOWAIT46  END CATCH47  ende:48  RETURN49END
Open raw exported source
SQL ยท Raw7 lines
1    create   trigger ADS_TIADSMachine on ADSMachine  for Insert not for Replication as begin  BEGIN TRY if exists (select top 1 1 from inserted)2 goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('')   if exists (select top 1 1 from ADSOtherSID3 a join inserted d on a.ObjectSID = d.ObjectSID ) begin delete ADSOtherSID where objectSID in (select ObjectSID from inserted ) and UID_ADSOtherSID not4 like 'ADS-%' end  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01(object, subobject, genprocid) select x.uid, null, @GenProcID5 from ( select uid_ADSMachine as uid from inserted i ) as x exec QBM_PDBQueueInsert_Bulk 'ADS-K-ADSMachineInADSGroup', @DBQueueElements_01 END TRY BEGIN6 CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7