Back to OIM Explorer

dbo.QBM_TUAssembly_DialogColHasSem

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on DialogColumnHasSemaphor. Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 5; References QBM_PDBQueueInsert_Bulk; Trigger parent table: DialogColumnHasSemaphor

Source: sandbox-db sys.sql_modules

Source size: 828 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-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 5
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: DialogColumnHasSemaphor

Typed Edges

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

SQL43 lines
1CREATE trigger QBM_TUAssembly_DialogColHasSem2  ON DialogColumnHasSemaphor 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    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw18    INSERT INTO @DBQueueElements_01(object,19    subobject,20    genprocid)21    SELECT22      x.UID,23      NULL,24      @GenProcID25    FROM(26    SELECT27      DISTINCT t.TableName AS uid28    FROM deleted i29    JOIN DialogColumn c30      ON c.UID_DialogColumn = i.UID_DialogColumn31    JOIN DialogTable t32      ON c.UID_DialogTable = t.UID_DialogTable) AS x33    EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger',34      @DBQueueElements_0135  END TRY36  BEGIN CATCH37    EXEC QBM_PSessionErrorAdd DEFAULT38    RAISERROR('',39    18,40    1)41      WITH NOWAIT42  END CATCH43END
Open raw exported source
SQL ยท Raw7 lines
1 create   trigger QBM_TUAssembly_DialogColHasSem on DialogColumnHasSemaphor  for Update not for Replication as begin declare @GenProcID varchar(382) = dbo.QBM_FGISessionContext('') BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return3 start:  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.UID, null, @GenProcID from4 (select distinct t.TableName as uid from deleted i join DialogColumn c on c.UID_DialogColumn = i.UID_DialogColumn join DialogTable t on c.UID_DialogTable5 = t.UID_DialogTable ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger', @DBQueueElements_01  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd6 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 7