Back to OIM Explorer

dbo.DPR_TUDPRSystemSyncDependency

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on DPRSystemSyncDependency. HOFireEvent -> DialogDatabase.UpdateSystemSyncs at line 8; References QBM_PJobCreate*; References QBM_PJobCreate_HOFireEvent*; Trigger parent table: DPRSystemSyncDependency

Source: sandbox-db sys.sql_modules

Source size: 1.517 characters

Interpretation

  • Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
  • Object-layer bridge detected through QBM_PJobCreate helper usage.

Relations

  • HOFireEvent -> DialogDatabase.UpdateSystemSyncs at line 8
  • References QBM_PJobCreate*
  • References QBM_PJobCreate_HOFireEvent*
  • Trigger parent table: DPRSystemSyncDependency

Typed Edges

  • fires event DialogDatabase.UpdateSystemSyncs HOFireEvent -> DialogDatabase.UpdateSystemSyncs at line 8
  • trigger on table DPRSystemSyncDependency Trigger parent table: DPRSystemSyncDependency
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PJobCreate source text reference
  • references source dbo.QBM_PJobCreate_HOFireEvent source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL69 lines
1CREATE trigger DPR_TUDPRSystemSyncDependency2  ON DPRSystemSyncDependency FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @Starten datetime = dateadd(ss,7  100,8  getutcdate())9  DECLARE @UID_Job varchar(38) = NULL10  DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')11  BEGIN TRY12    IF EXISTS(13      SELECT TOP 1 114      FROM inserted)15    GOTO start16    IF EXISTS(17      SELECT TOP 1 118      FROM deleted)19    GOTO start20    RETURN start:21    IF22    UPDATE(UID_DialogTablePrior) OR23    UPDATE(UID_DialogTable) OR24    UPDATE(DependencyType) OR25    UPDATE(Name) OR26    UPDATE(Description)27    BEGIN28      IF EXISTS(29        SELECT TOP 1 130        FROM DPRSystemSyncDependency c31        JOIN deleted d32          ON c.uid_DPRSystemSyncDependency = d.uid_DPRSystemSyncDependency33        WHERE34          c.UID_DialogTablePrior <> d.UID_DialogTablePrior OR c.UID_DialogTable <> d.UID_DialogTable OR c.DependencyType <> d.DependencyType OR ISNULL35      (c.name, '') <> ISNULL(d.name, '') OR ISNULL(c.Description, '') <> ISNULL(d.Description, ''))36      BEGIN37        SELECT TOP 1 @UID_Job = q.UID_Job38        FROM JobQueue q39        WHERE40          q.JobChainName = 'Created by QBMDBQueueProcess: fire event UpdateSystemSyncs for object type DialogDatabase' AND q.Ready2EXE = N 'TRUE'41        IF @UID_Job > ' '42        BEGIN43          UPDATE JobQueue44          SET StartAt = @Starten45          WHERE46            UID_Job = @UID_Job47        END48        ELSE49        BEGIN50          EXEC QBM_PJobCreate_HOFireEvent 'DialogDatabase',51          'IsMainDatabase = 1',52          'UpdateSystemSyncs',53            @GenProcID,54            @ObjectKeysAffected = DEFAULT,55            @Startat = @Starten56        END57      END58    END59  END TRY60  BEGIN CATCH61    EXEC QBM_PSessionErrorAdd DEFAULT62    RAISERROR('',63    18,64    1)65      WITH NOWAIT66  END CATCH67  ende:68  RETURN69END
Open raw exported source
SQL ยท Raw11 lines
1 create   trigger DPR_TUDPRSystemSyncDependency on DPRSystemSyncDependency  for Update not for Replication as begin declare @Starten datetime = 2dateadd(ss, 100, getutcdate()) declare @UID_Job varchar(38) = null declare @GenProcID varchar(38)= dbo.QBM_FGISessionContext('') BEGIN TRY if exists (select3 top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: if update(UID_DialogTablePrior) or UPDATE(UID_DialogTable4) or update(DependencyType) or update(Name) or update(Description) begin if exists (select top 1 1 from DPRSystemSyncDependency c join deleted d on c.uid_DPRSystemSyncDependency5 = d.uid_DPRSystemSyncDependency where c.UID_DialogTablePrior <> d.UID_DialogTablePrior or c.UID_DialogTable <> d.UID_DialogTable or c.DependencyType <>6 d.DependencyType or ISNULL(c.name, '') <> ISNULL(d.name, '') or ISNULL(c.Description, '') <> ISNULL(d.Description, '') ) begin select top 1 @UID_Job =7 q.UID_Job from JobQueue q where q.JobChainName = 'Created by QBMDBQueueProcess: fire event UpdateSystemSyncs for object type DialogDatabase' and q.Ready2EXE8 = N'TRUE' if @UID_Job > ' '  begin  update JobQueue set StartAt = @Starten where UID_Job = @UID_Job end else begin   exec QBM_PJobCreate_HOFireEvent 'DialogDatabase'9, 'IsMainDatabase = 1', 'UpdateSystemSyncs', @GenProcID, @ObjectKeysAffected = default , @Startat = @Starten end end end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd10 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 11