dbo.TSB_TUUNSAccountBHasUNSGroupB3
SQL_TRIGGER parent UNSAccountBHasUNSGroupB3
Created 2025-06-27T18:01:22.060 · modified 2026-04-14T23:23:08.850 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| deleted | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueRaw | TYPE | ||
| TSBPersonUsesAccount | OBJECT_OR_COLUMN | ||
| UNSAccountB | OBJECT_OR_COLUMN | ||
| UNSAccountBHasUNSGroupB3 | OBJECT_OR_COLUMN | ||
| UNSItemB | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIXOriginChanged_Effect | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIXOriginChanged_Except2 | 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_TUUNSAccountBHasUNSGroupB3 on UNSAccountBHasUNSGroupB3 for Update not for Replication as begin declare @GenProcID varchar 2(38) declare @XUser nvarchar(64) BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return 3 start: select @GenProcID = dbo.QBM_FGISessionContext('') select @XUser = dbo.QBM_FGISessionContext('XUser') if update(XOrigin) or update(XIsInEffect) 4begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( 5select distinct d.UID_UNSAccountB as uid from deleted d join UNSAccountBHasUNSGroupB3 dd on d.XObjectKey = dd.XObjectKey where dbo.QBM_FGIXOriginChanged_Except2 6(d.XOrigin, dd.XOrigin) = 1 or (d.XIsInEffect <> dd.XIsInEffect and dbo.QBM_FGISessionContext ('Fullsync') > ' ' ) ) as x exec QBM_PDBQueueInsert_Bulk 7 'TSB-K-UNSAccountBInUNSGroupB3', @DBQueueElements_01 end if update(XIsInEffect) or update(XOrigin) begin declare @DBQueueElements_02 QBM_YDBQueueRaw 8 insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct x.UID_Person as uid from UNSAccountBHasUNSGroupB3 9 a join deleted d on a.XObjectKey = d.XObjectKey join UNSAccountB x on a.UID_UNSAccountB = x.UID_UNSAccountB where x.UID_Person > ' ' and ( dbo.QBM_FGIXOriginChanged_Effect 10(d.XOrigin, a.XOrigin, d.XIsInEffect, a.XIsInEffect) = 1 or dbo.QER_FCVXOriginToInheritInfo(d.XOrigin) <> dbo.QER_FCVXOriginToInheritInfo(a.XOrigin) ) 11) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject', @DBQueueElements_02 if '1' = dbo.QBM_FGIConfigparmValue('QER\ComplianceCheck\IncludeTSBPersonUsesAccount' 12) begin declare @DBQueueElements_PersonUsesAccount QBM_YDBQueueRaw insert into @DBQueueElements_PersonUsesAccount (object, subobject, genprocid) select 13 x.uid, null, @GenProcID from ( select distinct t.uid_person as uid from UNSAccountBHasUNSGroupB3 aig join deleted d on aig.XObjectKey = d.XObjectKey 14 join UNSAccountB a on aig.UID_UNSAccountB = a.UID_UNSAccountB join TSBPersonUsesAccount t on a.XObjectKey = t.ObjectKeyAccount where ( dbo.QBM_FGIXOriginChanged_Effect 15(d.XOrigin, aig.XOrigin, d.XIsInEffect, aig.XIsInEffect) = 1 or dbo.QER_FCVXOriginToInheritInfo(d.XOrigin) <> dbo.QER_FCVXOriginToInheritInfo(aig.XOrigin 16) ) ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject', @DBQueueElements_PersonUsesAccount end if 'UNSGroupB3' = 'UNSGroupB' begin if exists 17 (select top 1 1 from UNSItemB ) begin declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select 18 x.uid, null, @GenProcID from ( select distinct d.UID_UNSAccountB as uid from UNSAccountBHasUNSGroupB3 a join deleted d on a.XObjectKey = d.XObjectKey 19 and dbo.QBM_FGIXOriginChanged_Effect(d.XOrigin, a.XOrigin, d.XIsInEffect, a.XIsInEffect) = 1 where exists (select top 1 1 from UNSAccountB acc join UNSItemB 20 b on acc.UID_UNSRootB = b.UID_UNSRootB and acc.UID_UNSAccountB = a.UID_UNSAccountB) ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBHasUNSItemB' 21, @DBQueueElements_03 end end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 22
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.850
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, UNSAccountBHasUNSGroupB3, UNSAccountB, TSBPersonUsesAccount…; uses config QER\ComplianceCheck\IncludeTSBPersonUsesAccount; uses session context XUser, Fullsync
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: QER\ComplianceCheck\IncludeTSBPersonUsesAccount
Session: XUser Fullsync
DBQueue/tasks
TSB-K-UNSAccountBInUNSGroupB3 TSB-K-PersonHasObject TSB-K-UNSAccountBHasUNSItemBTemp tables / referenced variables
Temp: None extracted.
Variables: @GenProcID @XUser @DBQueueElements_01 @DBQueueElements_02 @DBQueueElements_PersonUsesAccount @DBQueueElements_03
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.