dbo.QBM_TUAssembly_Job
Database TriggerSQL_TRIGGERSandbox DB
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 10
- Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 10
- Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 13
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: Job
Typed Edges
- queues DBQueue task QBM_ZScriptAssemblyReset at line 10 Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 10
- queues DBQueue task QBM_ZScriptAssemblyReset at line 13 Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 13
- trigger on table Job Trigger parent table: Job
- 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_PSessionErrorAdd source text reference
Complete Source
1CREATE trigger QBM_TUAssembly_Job2 ON Job 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(GenCondition) OR19 UPDATE(NotifyAddress) OR20 UPDATE(NotifyAddressSuccess) OR21 UPDATE(NotifyBody) OR22 UPDATE(NotifyBodySuccess) OR23 UPDATE(NotifySender) OR24 UPDATE(NotifySenderSuccess) OR25 UPDATE(NotifySubject) OR26 UPDATE(NotifySubjectSuccess) OR27 UPDATE(PreCode) OR28 UPDATE(ProcessDisplay) OR29 UPDATE(ServerDetectScript) OR30 UPDATE(ProcessInfoLevel) OR31 UPDATE(IsToFreezeOnError) OR32 UPDATE(IgnoreErrors) OR33 UPDATE(DeferOnError) OR34 UPDATE(MinutesToDefer) OR35 UPDATE(IsSplitOnly) OR36 UPDATE(Name) OR37 UPDATE(PreProcessorCondition) OR38 UPDATE(UID_Job) OR39 UPDATE(UID_JobTask) OR40 UPDATE(Retries) OR41 UPDATE(Priority) OR42 UPDATE(PriorityDefinition) OR43 UPDATE(UID_SuccessJob) OR44 UPDATE(UID_ErrorJob) OR45 UPDATE(LogMode) OR46 UPDATE(ProcessTracking) OR47 UPDATE(IsForHistory) OR48 UPDATE(IsNoDBQueueDefer) OR49 UPDATE(UID_QBMServerTag)50 BEGIN51 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw52 INSERT INTO @DBQueueElements_01(Object,53 SubObject,54 GenProcID)55 SELECT56 DISTINCT 'JobGen',57 dbo.QBM_FGITableName(c.UID_DialogTable),58 @GenProcID59 FROM inserted i60 JOIN Jobchain c61 ON i.uid_Jobchain = c.uid_Jobchain62 JOIN JobEventGen e63 ON e.UID_JobChain = c.UID_JobChain64 WHERE65 c.IsDeactivatedByPreProcessor = 0 AND c.NoGenerate = 066 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset',67 @DBQueueElements_0168 END69 IF70 UPDATE(IsDeactivatedByPreProcessor)71 BEGIN72 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw73 INSERT INTO @DBQueueElements_02(Object,74 SubObject,75 GenProcID)76 SELECT77 DISTINCT 'JobGen',78 dbo.QBM_FGITableName(c.UID_DialogTable),79 @GenProcID80 FROM inserted i81 JOIN Jobchain c82 ON i.uid_Jobchain = c.uid_Jobchain83 JOIN JobEventGen e84 ON e.UID_JobChain = c.UID_JobChain85 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset',86 @DBQueueElements_0287 END88 END TRY89 BEGIN CATCH90 EXEC QBM_PSessionErrorAdd DEFAULT91 RAISERROR('',92 18,93 1)94 WITH NOWAIT95 END CATCH96END
Open raw exported source
1 create trigger QBM_TUAssembly_Job on Job for Update not for Replication as begin declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext(2'') 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(GenCondition3) or update(NotifyAddress) or update(NotifyAddressSuccess) or update(NotifyBody) or update(NotifyBodySuccess) or update(NotifySender) or update(NotifySenderSuccess4) or update(NotifySubject) or update(NotifySubjectSuccess) or update(PreCode) or update(ProcessDisplay) or update(ServerDetectScript) or update(ProcessInfoLevel5) or update(IsToFreezeOnError) or update(IgnoreErrors) or update(DeferOnError) or update(MinutesToDefer) or update(IsSplitOnly) or update(Name) or update6(PreProcessorCondition) or update(UID_Job) or update(UID_JobTask) or update(Retries) or update(Priority) or update(PriorityDefinition) or update(UID_SuccessJob7) or update(UID_ErrorJob) or update(LogMode) or update(ProcessTracking) or update(IsForHistory) or update(IsNoDBQueueDefer) or update(UID_QBMServerTag8) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01(Object, SubObject, GenProcID) select distinct 'JobGen', dbo.QBM_FGITableName9(c.UID_DialogTable) , @GenProcID from inserted i join Jobchain c on i.uid_Jobchain = c.uid_Jobchain join JobEventGen e on e.UID_JobChain = c.UID_JobChain10 where c.IsDeactivatedByPreProcessor = 0 and c.NoGenerate = 0 exec QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset', @DBQueueElements_01 end if update11(IsDeactivatedByPreProcessor) begin declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02(Object, SubObject, GenProcID) select distinct12 'JobGen', dbo.QBM_FGITableName(c.UID_DialogTable) , @GenProcID from inserted i join Jobchain c on i.uid_Jobchain = c.uid_Jobchain join JobEventGen e on13 e.UID_JobChain = c.UID_JobChain exec QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset', @DBQueueElements_02 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd14 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 15