Back to OIM Explorer

dbo.QBM_TUAssembly_QBMEvent

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QBMEvent. Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 5; Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 5; Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 6; References QBM_PDBQueueInsert_Single

Source: sandbox-db sys.sql_modules

Source size: 1.090 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-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 5
  • Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 5
  • Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 6
  • References QBM_PDBQueueInsert_Single
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: QBMEvent

Typed Edges

  • queues DBQueue task QBM_ZScriptAssemblyReset at line 5 Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 5
  • queues DBQueue task QBM_ZScriptAssemblyReset at line 6 Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 6
  • trigger on table QBMEvent Trigger parent table: QBMEvent
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_FGITableName source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PDBQueueInsert_Single source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

Complete Source

SQL60 lines
1CREATE trigger QBM_TUAssembly_QBMEvent2  ON QBMEvent FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')7  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    IF18    UPDATE(EventName) OR19    UPDATE(UID_DialogTable)20    BEGIN21      DECLARE @DBQueueElements_01 QBM_YDBQueueRaw22      INSERT INTO @DBQueueElements_01(Object,23      SubObject,24      GenProcID)25      SELECT26        'JobGen',27        dbo.QBM_FGITableName(x.UID_DialogTable),28        @GenProcID29      FROM(30      SELECT d.UID_DialogTable31      FROM deleted d32      JOIN QBMEvent e33        ON d.UID_QBMEvent = e.UID_QBMEvent34      UNION35      SELECT e.UID_DialogTable36      FROM deleted d37      JOIN QBMEvent e38        ON d.UID_QBMEvent = e.UID_QBMEvent) AS x39      EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset',40        @DBQueueElements_0141    END42    IF43    UPDATE(EventName) OR44    UPDATE(UID_DialogTable) OR45    UPDATE(DisplayName)46    BEGIN47      EXEC QBM_PDBQueueInsert_Single 'QBM-K-ScriptAssemblyReset',48      'TypedWrappers',49      '#',50        @GenProcID51    END52  END TRY53  BEGIN CATCH54    EXEC QBM_PSessionErrorAdd DEFAULT55    RAISERROR('',56    18,57    1)58      WITH NOWAIT59  END CATCH60END
Open raw exported source
SQL ยท Raw8 lines
1 create   trigger QBM_TUAssembly_QBMEvent on QBMEvent  for Update not for Replication as begin  declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext2('') BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: if update(EventName3) or update(UID_DialogTable) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01(Object, SubObject, GenProcID) select 'JobGen'4, dbo.QBM_FGITableName(x.UID_DialogTable) , @GenProcID from ( select d.UID_DialogTable from deleted d join QBMEvent e on d.UID_QBMEvent = e.UID_QBMEvent5 union select e.UID_DialogTable from deleted d join QBMEvent e on d.UID_QBMEvent = e.UID_QBMEvent ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset'6, @DBQueueElements_01 end if update(EventName) or update(UID_DialogTable) or update(DisplayName) begin exec QBM_PDBQueueInsert_Single 'QBM-K-ScriptAssemblyReset'7, 'TypedWrappers', '#', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 8