dbo.QER_TDBaseTreeHasObject
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-BaseTreeHasObjectExtAtt / QER_ZBaseTreeHasObjectExtAtt at line 4
- Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 4
- Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 7
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: BaseTreeHasObject
Typed Edges
- queues DBQueue task QER_ZBaseTreeHasObjectExtAtt at line 4 Bulk DBQueue insert -> QER-K-BaseTreeHasObjectExtAtt / QER_ZBaseTreeHasObjectExtAtt at line 4
- queues DBQueue task QER_ZITShopPersonHasObjectFill at line 4 Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 4
- queues DBQueue task QER_ZITShopPersonHasObjectFill at line 7 Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 7
- trigger on table BaseTreeHasObject Trigger parent table: BaseTreeHasObject
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FGITableCountAll source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_TDBaseTree source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_FGITableCountAll
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QER_TDBaseTree
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QER_TDBaseTreeHasObject2 ON BaseTreeHasObject FOR3DELETE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM deleted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 IF dbo.QBM_FGITableCountAll('ObjectHasExtendedAttribute') > 015 BEGIN16 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw17 INSERT INTO @DBQueueElements_01(object,18 subobject,19 genprocid)20 SELECT21 x.uid,22 NULL,23 @GenProcID24 FROM(25 SELECT26 DISTINCT d.UID_Org AS uid27 FROM deleted d28 WHERE29 d.ObjectKey NOT LIKE '<Key><T>ExtendedAttribute</T>%') AS x30 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeHasObjectExtAtt',31 @DBQueueElements_0132 END33 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw34 INSERT INTO @DBQueueElements_02(object,35 subobject,36 genprocid)37 SELECT38 x.uid,39 NULL,40 @GenProcID41 FROM(42 SELECT43 DISTINCT pho.uid_Personwantsorg AS uid44 FROM deleted d45 JOIN HelperPWOPersonHasObject pho46 ON d.UID_Org = pho.uid_OrgRelated) AS x47 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackPersonHasObject',48 @DBQueueElements_0249 END TRY50 BEGIN CATCH51 EXEC QBM_PSessionErrorAdd DEFAULT52 RAISERROR('',53 18,54 1)55 WITH NOWAIT56 END CATCH57 ende:58 RETURN59END
Open raw exported source
1 create trigger QER_TDBaseTreeHasObject on BaseTreeHasObject for Delete not for Replication as begin BEGIN TRY if exists (select top 1 1 from2 deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if dbo.QBM_FGITableCountAll('ObjectHasExtendedAttribute'3) > 0 begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null,@GenProcID from4 ( select distinct d.UID_Org as uid from deleted d where d.ObjectKey not like '<Key><T>ExtendedAttribute</T>%' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeHasObjectExtAtt'5, @DBQueueElements_01 end declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null6,@GenProcID from ( select distinct pho.uid_Personwantsorg as uid from deleted d join HelperPWOPersonHasObject pho on d.UID_Org = pho.uid_OrgRelated ) as7 x exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackPersonHasObject', @DBQueueElements_02 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR8 ('', 18, 1) WITH NOWAIT END CATCH ende: return end 9