Back to OIM Explorer

dbo.QBM_TIAssembly_QBMViewAddOn

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QBMViewAddOn. Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 6; References QBM_PDBQueueInsert_Bulk; Trigger parent table: QBMViewAddOn

Source: sandbox-db sys.sql_modules

Source size: 1.138 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-CommonRebuildView / QBM_ZViewBuildAll at line 6
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: QBMViewAddOn

Typed Edges

  • queues DBQueue task QBM_ZViewBuildAll at line 6 Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 6
  • trigger on table QBMViewAddOn Trigger parent table: QBMViewAddOn
  • 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

Referenced By

  • No direct source references extracted.

Complete Source

SQL58 lines
1CREATE trigger QBM_TIAssembly_QBMViewAddOn2  ON QBMViewAddOn FOR3INSERT 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    RETURN start:13    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw14    INSERT INTO @DBQueueElements_01(object,15    subobject,16    genprocid)17    SELECT18      x.uid,19      NULL,20      @GenProcID21    FROM(22    SELECT t.UID_DialogTable AS UID23    FROM inserted i24    JOIN DialogTable t25      ON i.UID_DialogTable = t.UID_DialogTable26    WHERE27      i.IsGenerated = 028    UNION29    SELECT t2.UID_DialogTable30    FROM inserted i31    JOIN DialogTable t32      ON i.UID_DialogTable = t.UID_DialogTable33    JOIN DialogTable t234      ON t.UID_DialogTableBase = t2.UID_DialogTable35    WHERE36      i.IsGenerated = 037    UNION38    SELECT t2.UID_DialogTableUnion39    FROM inserted i40    JOIN DialogTable t41      ON i.UID_DialogTable = t.UID_DialogTable42    JOIN DialogTable t243      ON t.UID_DialogTableUnion = t2.UID_DialogTable44    WHERE45      i.IsGenerated = 0) AS x46    EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonRebuildView',47      @DBQueueElements_0148  END TRY49  BEGIN CATCH50    EXEC QBM_PSessionErrorAdd DEFAULT51    RAISERROR('',52    18,53    1)54      WITH NOWAIT55  END CATCH56  ende:57  RETURN58END
Open raw exported source
SQL ยท Raw9 lines
1  create   trigger QBM_TIAssembly_QBMViewAddOn on QBMViewAddOn  for Insert not for Replication as begin declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext2('') BEGIN TRY if exists (select top 1 1 from inserted) goto start return start:   declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_013 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select t.UID_DialogTable as UID from inserted i join DialogTable t on i.UID_DialogTable4 = t.UID_DialogTable where i.IsGenerated = 0 union select t2.UID_DialogTable from inserted i join DialogTable t on i.UID_DialogTable = t.UID_DialogTable5 join DialogTable t2 on t.UID_DialogTableBase = t2.UID_DialogTable where i.IsGenerated = 0 union select t2.UID_DialogTableUnion from inserted i join DialogTable6 t on i.UID_DialogTable = t.UID_DialogTable join DialogTable t2 on t.UID_DialogTableUnion = t2.UID_DialogTable where i.IsGenerated = 0 ) as x exec QBM_PDBQueueInsert_Bulk7 'QBM-K-CommonRebuildView', @DBQueueElements_01  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende:8 return end 9