Back to OIM Explorer

dbo.QER_TIQERRiskIndex

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QERRiskIndex. Bulk DBQueue insert -> QER-K-QERRiskIndexMakeProc / QER_ZRiskIndexMakeProc at line 5; Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 5; Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 6; References QBM_PDBQueueInsert_Bulk

Source: sandbox-db sys.sql_modules

Source size: 1.008 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 -> QER-K-QERRiskIndexMakeProc / QER_ZRiskIndexMakeProc at line 5
  • Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 5
  • Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 6
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: QERRiskIndex

Typed Edges

  • queues DBQueue task QER_ZRiskIndexMakeProc at line 5 Bulk DBQueue insert -> QER-K-QERRiskIndexMakeProc / QER_ZRiskIndexMakeProc at line 5
  • queues DBQueue task QER_ZRiskIndexCalculate at line 5 Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 5
  • queues DBQueue task QER_ZRiskIndexCalculate at line 6 Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 6
  • trigger on table QERRiskIndex Trigger parent table: QERRiskIndex
  • 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
  • references source dbo.QBM_PSQLCheckExecutable source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL53 lines
1CREATE trigger QER_TIQERRiskIndex2  ON QERRiskIndex FOR3INSERT NOT FOR Replication4AS5BEGIN6  DECLARE @SQLToCheck QBM_YParameterList7  BEGIN TRY8    IF EXISTS(9      SELECT TOP 1 110      FROM inserted)11    GOTO start12    RETURN start:13    DECLARE @GenProcID varchar(38)14    SELECT @GenProcID = dbo.QBM_FGISessionContext('')15    INSERT INTO @SQLToCheck(Parameter1,16    ContentFull)17    SELECT18      c.XObjectKey,19      c.QueryString20    FROM inserted c21    WHERE22      c.QueryString > ' '23    EXEC QBM_PSQLCheckExecutable @SQLToCheck,24      @RaiseError = 125    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw26    INSERT INTO @DBQueueElements_01(object,27    subobject,28    genprocid)29    SELECT30      x.uid,31      NULL,32      @GenProcID33    FROM(34    SELECT35      DISTINCT d.uid_dialogColumn AS uid36    FROM inserted d37    WHERE38      d.uid_dialogColumn > ' ') AS x39    EXEC QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexMakeProc',40      @DBQueueElements_0141    EXEC QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexCalculate',42      @DBQueueElements_0143  END TRY44  BEGIN CATCH45    EXEC QBM_PSessionErrorAdd DEFAULT46    RAISERROR('',47    18,48    1)49      WITH NOWAIT50  END CATCH51  ende:52  RETURN53END
Open raw exported source
SQL ยท Raw8 lines
1  create   trigger QER_TIQERRiskIndex on QERRiskIndex  for Insert not for Replication as begin  declare @SQLToCheck QBM_YParameterList BEGIN TRY2 if exists (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('')  insert3 into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey, c.QueryString from inserted c  where c.QueryString > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck4, @RaiseError = 1 declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID5 from ( select distinct d.uid_dialogColumn as uid from inserted d where d.uid_dialogColumn > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexMakeProc'6, @DBQueueElements_01  exec QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexCalculate', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default7 RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 8