Back to OIM Explorer

dbo.QER_TUQEREntitlementSource

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QEREntitlementSource. Single DBQueue insert -> QER-K-EntitlementSourceMakeProc / QER_ZEntitlementSourceMakeProc at line 5; References QBM_PDBQueueInsert_Single; Trigger parent table: QEREntitlementSource

Source: sandbox-db sys.sql_modules

Source size: 875 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

  • Single DBQueue insert -> QER-K-EntitlementSourceMakeProc / QER_ZEntitlementSourceMakeProc at line 5
  • References QBM_PDBQueueInsert_Single
  • Trigger parent table: QEREntitlementSource

Typed Edges

  • queues DBQueue task QER_ZEntitlementSourceMakeProc at line 5 Single DBQueue insert -> QER-K-EntitlementSourceMakeProc / QER_ZEntitlementSourceMakeProc at line 5
  • trigger on table QEREntitlementSource Trigger parent table: QEREntitlementSource
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PDBQueueInsert_Single source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_PSQLCheckExecutable source text reference

Complete Source

SQL53 lines
1CREATE trigger QER_TUQEREntitlementSource2  ON QEREntitlementSource FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @SQLToCheck 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(SQLQuery)21    BEGIN22      INSERT INTO @SQLToCheck(Parameter1,23      ContentFull)24      SELECT25        c.XObjectKey,26        c.SQLQuery27      FROM inserted c28      WHERE29        c.SQLQuery > ' '30      EXEC QBM_PSQLCheckExecutable @SQLToCheck,31        @RaiseError = 132    END33    IF34    UPDATE(UID_DialogTable) OR35    UPDATE(SQLQuery) OR36    UPDATE(Ident_QEREntitlementSource)37    BEGIN38      EXEC QBM_PDBQueueInsert_Single 'QER-K-EntitlementSourceMakeProc',39      '',40      '',41        @GenProcID42    END43  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 ยท Raw7 lines
1create   trigger QER_TUQEREntitlementSource on QEREntitlementSource  for Update not for Replication as begin  declare @SQLToCheck QBM_YParameterList2 BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar3(38) select @GenProcID = dbo.QBM_FGISessionContext('')  if update(SQLQuery) begin insert into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey,4 c.SQLQuery from inserted c  where c.SQLQuery > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 end if update(UID_DialogTable) or update(SQLQuery5) or update(Ident_QEREntitlementSource) begin exec QBM_PDBQueueInsert_Single 'QER-K-EntitlementSourceMakeProc', '', '', @GenProcID end  END TRY BEGIN CATCH6 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7