dbo.QBM_TUAssembly_DialogScript
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 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: DialogScript
Typed Edges
- queues DBQueue task QBM_ZScriptAssemblyReset at line 5 bulk DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 5
- trigger on table DialogScript Trigger parent table: DialogScript
- 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
1CREATE trigger QBM_TUAssembly_DialogScript2 ON DialogScript 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(IsLocked) OR19 UPDATE(ScriptCode)20 BEGIN21 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw22 INSERT INTO @DBQueueElements_01(Object,23 SubObject,24 GenProcID)25 SELECT26 'Scripts',27 s.UID_DialogScript,28 @GenProcID29 FROM DialogScript s30 JOIN deleted d31 ON s.UID_DialogScript = d.UID_DialogScript32 WHERE33 ISNULL(s.ScriptCode,34 '') <> ISNULL(d.ScriptCode,35 '') OR ISNULL(s.IsLocked,36 0) <> ISNULL(d.IsLocked,37 0)38 EXEC QBM_PDBQueueInsert_bulk 'QBM-K-ScriptAssemblyReset',39 @DBQueueElements_0140 END41 END TRY42 BEGIN CATCH43 EXEC QBM_PSessionErrorAdd DEFAULT44 RAISERROR('',45 18,46 1)47 WITH NOWAIT48 END CATCH49END
Open raw exported source
1 create trigger QBM_TUAssembly_DialogScript on DialogScript 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(IsLocked)3 or update(ScriptCode) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01(Object, SubObject, GenProcID) select 'Scripts'4, s.UID_DialogScript , @GenProcID from DialogScript s join deleted d on s.UID_DialogScript = d.UID_DialogScript where ISNULL(s.ScriptCode, '') <> ISNULL5(d.ScriptCode, '') or ISNULL(s.IsLocked, 0) <> ISNULL(d.IsLocked, 0) exec QBM_PDBQueueInsert_bulk 'QBM-K-ScriptAssemblyReset', @DBQueueElements_01 end6 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 7