dbo.TSB_TUBaseTreeHasUNSGroupB3
SQL_TRIGGER parent BaseTreeHasUNSGroupB3
Created 2025-06-27T18:01:22.030 · modified 2026-04-14T23:23:08.007 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| BaseTree | OBJECT_OR_COLUMN | ||
| BaseTreeHasUNSGroupB3 | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| HelperPersonOrg | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| PersoninBaseTree | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YSingleGUID | TYPE | ||
| UNSAccountB | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIXOriginChanged_Effect | OBJECT_OR_COLUMN | |
| dbo | QER_FCVXOriginToInheritInfo | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create trigger TSB_TUBaseTreeHasUNSGroupB3 on BaseTreeHasUNSGroupB3 for Update not for Replication as begin declare @ChangedOrg QBM_YSingleGUID 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: declare @GenProcID varchar 3(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update(XOrigin) or update(XIsInEffect) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert 4 into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct a.UID_Org as uid from BaseTreeHasUNSGroupB3 5 a join deleted d on a.XObjectKey = d.XObjectKey where ( dbo.QBM_FGIXOriginChanged_Effect(d.XOrigin, a.XOrigin, d.XIsInEffect, a.XIsInEffect) = 1 or dbo.QER_FCVXOriginToInheritInfo 6(d.XOrigin) <> dbo.QER_FCVXOriginToInheritInfo(a.XOrigin) ) ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-BaseTreeHasObject', @DBQueueElements_01 insert into 7 @ChangedOrg (UID_SingleGuid) select distinct d.UID_Org as uid from BaseTreeHasUNSGroupB3 a join deleted d on a.XObjectKey = d.XObjectKey where dbo.QBM_FGIXOriginChanged_Effect 8(d.XOrigin, a.XOrigin, d.XIsInEffect, a.XIsInEffect) = 1 if @@ROWCOUNT > 0 begin declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 9 (object, subobject, genprocid) select x.uid, 'TSB-K-OrgHasUNSGroupB3', @GenProcID from ( select c.UID_SingleGuid as uid from @ChangedOrg c ) as x exec 10 QBM_PDBQueueInsert_Bulk 'QER-K-AllChildrenOfOrg', @DBQueueElements_02 declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object 11, subobject, genprocid) select x.uid, null, @GenProcID from ( select b.UID_Org as uid from @ChangedOrg c join BaseTree b on c.UID_SingleGuid = b.UID_Org 12 where b.ITShopInfo = 'BO' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgAutoChild', @DBQueueElements_03 declare @DBQueueElements_04 QBM_YDBQueueRaw insert 13 into @DBQueueElements_04 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select ac.UID_UNSAccountB as uid from @ChangedOrg c join 14 PersoninBaseTree pio on c.UID_SingleGuid = pio.UID_Org and pio.XOrigin > 0 join UNSAccountB ac on ac.UID_Person = pio.UID_Person and ac.IsGroupAccount_UNSGroupB3 15 = 1 union select ac.UID_UNSAccountB as uid from @ChangedOrg c join HelperPersonOrg hpo on c.UID_SingleGuid = hpo.UID_Org join UNSAccountB ac on ac.UID_Person 16 = hpo.UID_Person and ac.IsGroupAccount_UNSGroupB3 = 1 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB3', @DBQueueElements_04 end 17 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 18
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:23:08.007
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, BaseTreeHasUNSGroupB3, BaseTree, PersoninBaseTree…
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE notCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
TSB-K-BaseTreeHasObject TSB-K-OrgHasUNSGroupB3 QER-K-AllChildrenOfOrg QER-K-OrgAutoChild TSB-K-UNSAccountBInUNSGroupB3Temp tables / referenced variables
Temp: None extracted.
Variables: @ChangedOrg @GenProcID @DBQueueElements_01 @ROWCOUNT @DBQueueElements_02 @DBQueueElements_03 @DBQueueElements_04
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
No reverse dependencies extracted.