dbo.QER_TUHardwareInBaseTree
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 -> QER-K-AllForOneHardware / QER_ZAllForOneHardware at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: HardwareInBaseTree
Typed Edges
- queues DBQueue task QER_ZAllForOneHardware at line 5 Bulk DBQueue insert -> QER-K-AllForOneHardware / QER_ZAllForOneHardware at line 5
- trigger on table HardwareInBaseTree Trigger parent table: HardwareInBaseTree
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FGIXOriginChanged_Effect source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_TUHardware source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_FGIXOriginChanged_Effect
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QER_TUHardware
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QER_TUHardwareInBaseTree2 ON HardwareInBaseTree FOR3UPDATE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM deleted)10 GOTO start11 IF EXISTS(12 SELECT TOP 1 113 FROM inserted)14 GOTO start15 RETURN start:16 DECLARE @GenProcID varchar(38)17 SELECT @GenProcID = dbo.QBM_FGISessionContext('')18 IF19 UPDATE(XOrigin)20 BEGIN21 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw22 INSERT INTO @DBQueueElements_01(object,23 subobject,24 genprocid)25 SELECT26 x.uid,27 NULL,28 @GenProcID29 FROM(30 SELECT31 DISTINCT d.uid_Hardware AS uid32 FROM deleted d33 JOIN HardwareInBaseTree a34 ON d.XObjectKey = a.XObjectKey35 WHERE36 dbo.QBM_FGIXOriginChanged_Effect(d.XOrigin, a.XOrigin, 1, 1) = 1) AS x37 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-AllForOneHardware',38 @DBQueueElements_0139 END40 END TRY41 BEGIN CATCH42 EXEC QBM_PSessionErrorAdd DEFAULT43 RAISERROR('',44 18,45 1)46 WITH NOWAIT47 END CATCH48 ende:49 RETURN50END
Open raw exported source
1create trigger QER_TUHardwareInBaseTree on HardwareInBaseTree for update not for Replication as begin BEGIN TRY if exists (select top 1 1 from2 deleted) goto start if exists (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') if update(XOrigin) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid,4 null, @GenProcID from ( select distinct d.uid_Hardware as uid from deleted d join HardwareInBaseTree a on d.XObjectKey = a.XObjectKey where dbo.QBM_FGIXOriginChanged_Effect5(d.XOrigin, a.XOrigin, 1, 1) = 1 ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-AllForOneHardware', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd6 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7