dbo.QBM_TUAssembly_JobEventGen
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 6
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: JobEventGen
Typed Edges
- queues DBQueue task QBM_ZScriptAssemblyReset at line 6 Bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 6
- trigger on table JobEventGen Trigger parent table: JobEventGen
- 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
- references source dbo.QBM_TUAssembly_Job source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_FGITableName
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QBM_TUAssembly_Job
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QBM_TUAssembly_JobEventGen2 ON JobEventGen 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(ProcessDisplay) OR19 UPDATE(UID_QBMEvent)20 BEGIN21 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw22 INSERT INTO @DBQueueElements_01(Object,23 SubObject,24 GenProcID)25 SELECT26 'JobGen',27 dbo.QBM_FGITableName(x.UID_DialogTable),28 @GenProcID29 FROM(30 SELECT e.UID_DialogTable31 FROM deleted d32 JOIN JobEventGen je33 ON d.UID_JobEventGen = je.UID_JobEventGen34 JOIN QBMEvent e35 ON d.UID_QBMEvent = e.UID_QBMEvent36 UNION37 SELECT e.UID_DialogTable38 FROM deleted d39 JOIN JobEventGen je40 ON d.UID_JobEventGen = je.UID_JobEventGen41 JOIN QBMEvent e42 ON je.UID_QBMEvent = e.UID_QBMEvent) AS x43 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset',44 @DBQueueElements_0145 END46 END TRY47 BEGIN CATCH48 EXEC QBM_PSessionErrorAdd DEFAULT49 RAISERROR('',50 18,51 1)52 WITH NOWAIT53 END CATCH54END
Open raw exported source
1 create trigger QBM_TUAssembly_JobEventGen on JobEventGen for Update not for Replication as begin declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext2('') 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(ProcessDisplay3) or update(UID_QBMEvent) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01(Object, SubObject, GenProcID) select 'JobGen'4, dbo.QBM_FGITableName(x.UID_DialogTable) , @GenProcID from ( select e.UID_DialogTable from deleted d join JobEventGen je on d.UID_JobEventGen = je.UID_JobEventGen5 join QBMEvent e on d.UID_QBMEvent = e.UID_QBMEvent union select e.UID_DialogTable from deleted d join JobEventGen je on d.UID_JobEventGen = je.UID_JobEventGen6 join QBMEvent e on je.UID_QBMEvent = e.UID_QBMEvent ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-ScriptAssemblyReset', @DBQueueElements_01 end END TRY 7BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 8