dbo.DPR_TUDialogTable
Database TriggerSQL_TRIGGERSandbox DB
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 7
- References QBM_PJobCreate*
- References QBM_PJobCreate_HOFireEvent*
- Trigger parent table: DialogTable
Typed Edges
- fires event DialogDatabase.UpdateSystemSyncs HOFireEvent -> DialogDatabase.UpdateSystemSyncs at line 7
- trigger on table DialogTable Trigger parent table: DialogTable
- 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
- dbo.QBM_FGISessionContext
- dbo.QBM_PJobCreate
- dbo.QBM_PJobCreate_HOFireEvent
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger DPR_TUDialogTable2 ON DialogTable 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(SystemSyncMode) OR23 UPDATE(SystemSyncKeyColumns) OR24 UPDATE(UID_SystemSyncConfigCLRType)25 BEGIN26 IF EXISTS(27 SELECT TOP 1 128 FROM DialogTable t29 JOIN deleted d30 ON t.UID_DialogTable = d.UID_DialogTable31 WHERE32 t.SystemSyncMode <> d.SystemSyncMode OR ISNULL(t.SystemSyncKeyColumns, '') <> ISNULL(d.SystemSyncKeyColumns,33 '') OR ISNULL(t.UID_SystemSyncConfigCLRType, '') <> ISNULL(d.UID_SystemSyncConfigCLRType, ''))34 BEGIN35 SELECT TOP 1 @UID_Job = q.UID_Job36 FROM JobQueue q37 WHERE38 q.JobChainName = 'Created by QBMDBQueueProcess: fire event UpdateSystemSyncs for object type DialogDatabase' AND q.Ready2EXE = N 'TRUE'39 IF @UID_Job > ' '40 BEGIN41 UPDATE JobQueue42 SET StartAt = @Starten43 WHERE44 UID_Job = @UID_Job45 END46 ELSE47 BEGIN48 EXEC QBM_PJobCreate_HOFireEvent 'DialogDatabase',49 'IsMainDatabase = 1',50 'UpdateSystemSyncs',51 @GenProcID,52 @ObjectKeysAffected = DEFAULT,53 @Startat = @Starten54 END55 END56 END57 END TRY58 BEGIN CATCH59 EXEC QBM_PSessionErrorAdd DEFAULT60 RAISERROR('',61 18,62 1)63 WITH NOWAIT64 END CATCH65END
Open raw exported source
1 create trigger DPR_TUDialogTable on DialogTable for Update not for Replication as begin declare @Starten datetime = dateadd(ss, 100, getutcdate2()) declare @UID_Job varchar(38) = null declare @GenProcID varchar(38)= dbo.QBM_FGISessionContext('') BEGIN TRY if exists (select top 1 1 from inserted3) goto start if exists (select top 1 1 from deleted) goto start return start: if update(SystemSyncMode) or UPDATE(SystemSyncKeyColumns) or UPDATE(UID_SystemSyncConfigCLRType4) begin if exists (select top 1 1 from DialogTable t join deleted d on t.UID_DialogTable = d.UID_DialogTable where t.SystemSyncMode <> d.SystemSyncMode5 or ISNULL(t.SystemSyncKeyColumns,'') <> ISNULL(d.SystemSyncKeyColumns,'') or ISNULL(t.UID_SystemSyncConfigCLRType,'') <> ISNULL(d.UID_SystemSyncConfigCLRType6,'') ) begin select top 1 @UID_Job = q.UID_Job from JobQueue q where q.JobChainName = 'Created by QBMDBQueueProcess: fire event UpdateSystemSyncs for object type DialogDatabase'7 and q.Ready2EXE = N'TRUE' if @UID_Job > ' ' begin update JobQueue set StartAt = @Starten where UID_Job = @UID_Job end else begin exec QBM_PJobCreate_HOFireEvent8 'DialogDatabase', 'IsMainDatabase = 1', 'UpdateSystemSyncs', @GenProcID, @ObjectKeysAffected = default , @Startat = @Starten end end end END TRY BEGIN9 CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 10