Back to OIM Explorer

dbo.QBM_TUQBMTree

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QBMTree. Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 5; References QBM_PDBQueueInsert_Bulk; Trigger parent table: QBMTree

Source: sandbox-db sys.sql_modules

Source size: 935 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-CommonPrepropTree / QBM_ZPrePropTree at line 5
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: QBMTree

Typed Edges

  • queues DBQueue task QBM_ZPrePropTree at line 5 Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 5
  • trigger on table QBMTree Trigger parent table: QBMTree
  • 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

Complete Source

SQL49 lines
1CREATE trigger QBM_TUQBMTree2  ON QBMTree FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @ConditionsToCheck QBM_YParameterList7  BEGIN TRY8    IF EXISTS(9      SELECT TOP 1 110      FROM inserted)11    GOTO start12    IF EXISTS(13      SELECT TOP 1 114      FROM deleted)15    GOTO start16    RETURN start:17    DECLARE @GenProcID varchar(38)18    SELECT @GenProcID = dbo.QBM_FGISessionContext('')19    IF20    UPDATE(UID_QBMTreeParent) OR21    UPDATE(PreprocessorCondition)22    BEGIN23      INSERT INTO @ConditionsToCheck(ContentFull)24      SELECT i.PreProcessorCondition25      FROM inserted i26      EXEC QBM_PPrePropCheckSyntax @ConditionsToCheck27      DECLARE @DBQueueElements_01 QBM_YDBQueueRaw28      INSERT INTO @DBQueueElements_01(object,29      subobject,30      genprocid)31      SELECT32        x.uid,33        NULL,34        @GenProcID35      FROM(36      SELECT uid_QBMTree AS uid37      FROM inserted) AS x38      EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree',39        @DBQueueElements_0140    END41  END TRY42  BEGIN CATCH43    EXEC QBM_PSessionErrorAdd DEFAULT44    RAISERROR('',45    18,46    1)47      WITH NOWAIT48  END CATCH49END
Open raw exported source
SQL ยท Raw7 lines
1 create   trigger QBM_TUQBMTree on QBMTree  for Update not for Replication as begin declare @ConditionsToCheck QBM_YParameterList BEGIN TRY if exists2 (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID3 = dbo.QBM_FGISessionContext('')  if update(UID_QBMTreeParent) or update(PreprocessorCondition) begin  insert into @ConditionsToCheck (ContentFull) select4 i.PreProcessorCondition from inserted i exec QBM_PPrePropCheckSyntax @ConditionsToCheck  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_015 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select uid_QBMTree as uid from inserted ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree'6, @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 7