Back to OIM Explorer

dbo.QBM_TUJobChain

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on JobChain. Bulk DBQueue insert -> QBM-K-CommonPrepropJobChain / QBM_ZPrePropJobChain at line 5; References QBM_PDBQueueInsert_Bulk; Trigger parent table: JobChain

Source: sandbox-db sys.sql_modules

Source size: 913 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 -> QBM-K-CommonPrepropJobChain / QBM_ZPrePropJobChain at line 5
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: JobChain

Typed Edges

  • queues DBQueue task QBM_ZPrePropJobChain at line 5 Bulk DBQueue insert -> QBM-K-CommonPrepropJobChain / QBM_ZPrePropJobChain at line 5
  • trigger on table JobChain Trigger parent table: JobChain
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PPrePropCheckSyntax source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_TUJob source text reference

Complete Source

SQL48 lines
1CREATE trigger QBM_TUJobChain2  ON JobChain FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @GenProcID varchar(38)7  DECLARE @ConditionsToCheck QBM_YParameterList8  BEGIN TRY9    IF EXISTS(10      SELECT TOP 1 111      FROM inserted)12    GOTO start13    IF EXISTS(14      SELECT TOP 1 115      FROM deleted)16    GOTO start17    RETURN start:18    SELECT @GenProcID = dbo.QBM_FGISessionContext('')19    IF20    UPDATE(PreProcessorCondition)21    BEGIN22      INSERT INTO @ConditionsToCheck(ContentFull)23      SELECT i.PreProcessorCondition24      FROM inserted i25      EXEC QBM_PPrePropCheckSyntax @ConditionsToCheck26      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_Jobchain AS UID36      FROM inserted) AS x37      EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropJobChain',38        @DBQueueElements_0139    END40  END TRY41  BEGIN CATCH42    EXEC QBM_PSessionErrorAdd DEFAULT43    RAISERROR('',44    18,45    1)46      WITH NOWAIT47  END CATCH48END
Open raw exported source
SQL ยท Raw7 lines
1  create   trigger QBM_TUJobChain on JobChain  for Update not for Replication as begin  declare @GenProcID varchar(38) declare @ConditionsToCheck2 QBM_YParameterList BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: select3 @GenProcID = dbo.QBM_FGISessionContext('') if update(PreProcessorCondition) begin  insert into @ConditionsToCheck (ContentFull) select i.PreProcessorCondition4 from inserted i exec QBM_PPrePropCheckSyntax @ConditionsToCheck  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, 5subobject, genprocid) select x.uid, null, @GenProcID from (select uid_Jobchain as UID from inserted ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropJobChain'6, @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 7