dbo.TSB_TUUNSAccountB
SQL_TRIGGER parent UNSAccountB
Created 2025-06-27T18:01:21.077 · modified 2026-04-14T23:23:08.833 · 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 | ||
| UNSAccountB | OBJECT_OR_COLUMN | ||
| UNSRootB | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIBitPatternXMarkedForDel | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | 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_TUUNSAccountB on UNSAccountB for Update not for Replication as begin if exists (select top 1 1 from inserted) goto start 2if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) declare @QBM_BitPatternXMarkedForDel_OutStanding int = 3dbo.QBM_FGIBitPatternXMarkedForDel('|OutStanding|', 0) BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext('') if update(UID_Person) begin declare 4@DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select uid_person 5 as uid from inserted where uid_person > ' ' union select uid_person from deleted where uid_person > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-PersonHasObject' 6, @DBQueueElements_01 end if update(UID_Person) or update(UID_TSBBehavior) or update(MatchPatternForMembership) or update(AccountDisabled) or update 7(XMarkedForDeletion) begin declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select x.uid, null 8, @GenProcID from (select a.UID_UNSAccountB as uid from UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB join UNSRootB r on a.UID_UNSRootB 9 = r.UID_UNSRootB and r.GroupUsageMask & 0x01 > 0 where isnull(d.UID_Person,'') <> isnull(a.UID_Person,'') or isnull(d.UID_UNSContainerB,'') <> isnull(a.UID_UNSContainerB 10,'') or isnull(d.UID_TSBBehavior,'') <> isnull(a.UID_TSBBehavior,'') or isnull(d.MatchPatternForMembership,0) <> isnull(a.MatchPatternForMembership,0) 11or isnull(d.AccountDisabled,0) <> isnull(a.AccountDisabled,0) or (d.XMarkedForDeletion ^ a.XMarkedForDeletion ) & @QBM_BitPatternXMarkedForDel_OutStanding 12 > 0 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB', @DBQueueElements_03 declare @DBQueueElements_04 QBM_YDBQueueRaw insert into @DBQueueElements_04 13 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select a.UID_UNSAccountB as uid from UNSAccountB a join deleted d on a.UID_UNSAccountB 14 = d.UID_UNSAccountB join UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB and r.GroupUsageMask & 0x02 > 0 where isnull(d.UID_Person,'') <> isnull(a.UID_Person 15,'') or isnull(d.UID_UNSContainerB,'') <> isnull(a.UID_UNSContainerB,'') or isnull(d.UID_TSBBehavior,'') <> isnull(a.UID_TSBBehavior,'') or isnull(d.MatchPatternForMembership 16,0) <> isnull(a.MatchPatternForMembership,0) or isnull(d.AccountDisabled,0) <> isnull(a.AccountDisabled,0) or (d.XMarkedForDeletion ^ a.XMarkedForDeletion 17 ) & @QBM_BitPatternXMarkedForDel_OutStanding > 0 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB1', @DBQueueElements_04 declare @DBQueueElements_05 18 QBM_YDBQueueRaw insert into @DBQueueElements_05 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select a.UID_UNSAccountB as uid from 19 UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB join UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB and r.GroupUsageMask & 0x04 > 20 0 where isnull(d.UID_Person,'') <> isnull(a.UID_Person,'') or isnull(d.UID_UNSContainerB,'') <> isnull(a.UID_UNSContainerB,'') or isnull(d.UID_TSBBehavior 21,'') <> isnull(a.UID_TSBBehavior,'') or isnull(d.MatchPatternForMembership,0) <> isnull(a.MatchPatternForMembership,0) or isnull(d.AccountDisabled,0) <> 22 isnull(a.AccountDisabled,0) or (d.XMarkedForDeletion ^ a.XMarkedForDeletion ) & @QBM_BitPatternXMarkedForDel_OutStanding > 0 ) as x exec QBM_PDBQueueInsert_Bulk 23 'TSB-K-UNSAccountBInUNSGroupB2', @DBQueueElements_05 declare @DBQueueElements_06 QBM_YDBQueueRaw insert into @DBQueueElements_06 (object, subobject, genprocid 24) select x.uid, null, @GenProcID from (select a.UID_UNSAccountB as uid from UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB join 25UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB and r.GroupUsageMask & 0x08 > 0 where isnull(d.UID_Person,'') <> isnull(a.UID_Person,'') or isnull(d.UID_UNSContainerB 26,'') <> isnull(a.UID_UNSContainerB,'') or isnull(d.UID_TSBBehavior,'') <> isnull(a.UID_TSBBehavior,'') or isnull(d.MatchPatternForMembership,0) <> isnull 27(a.MatchPatternForMembership,0) or isnull(d.AccountDisabled,0) <> isnull(a.AccountDisabled,0) or (d.XMarkedForDeletion ^ a.XMarkedForDeletion ) & @QBM_BitPatternXMarkedForDel_OutStanding 28 > 0 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB3', @DBQueueElements_06 end if update(IsGroupAccount_UNSGroupB) begin declare @DBQueueElements_07 29 QBM_YDBQueueRaw insert into @DBQueueElements_07 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select a.UID_UNSAccountB as uid from 30 UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB join UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB and r.GroupUsageMask & 0x01 > 31 0 where isnull(d.IsGroupAccount_UNSGroupB,0) <> isnull(a.IsGroupAccount_UNSGroupB,0) and a.UID_Person > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB' 32, @DBQueueElements_07 end if update(IsGroupAccount_UNSGroupB1) begin declare @DBQueueElements_08 QBM_YDBQueueRaw insert into @DBQueueElements_08 (object 33, subobject, genprocid) select x.uid, null, @GenProcID from (select a.UID_UNSAccountB as uid from UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB 34 join UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB and r.GroupUsageMask & 0x02 > 0 where isnull(d.IsGroupAccount_UNSGroupB1,0) <> isnull(a.IsGroupAccount_UNSGroupB1 35,0) and a.UID_Person > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB1', @DBQueueElements_08 end if update(IsGroupAccount_UNSGroupB2 36) begin declare @DBQueueElements_09 QBM_YDBQueueRaw insert into @DBQueueElements_09 (object, subobject, genprocid) select x.uid, null, @GenProcID from 37(select a.UID_UNSAccountB as uid from UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB join UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB 38 and r.GroupUsageMask & 0x04 > 0 where isnull(d.IsGroupAccount_UNSGroupB2,0) <> isnull(a.IsGroupAccount_UNSGroupB2,0) and a.UID_Person > ' ' ) as x exec 39 QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB2', @DBQueueElements_09 end if update(IsGroupAccount_UNSGroupB3) begin declare @DBQueueElements_10 40 QBM_YDBQueueRaw insert into @DBQueueElements_10 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select a.UID_UNSAccountB as uid from 41 UNSAccountB a join deleted d on a.UID_UNSAccountB = d.UID_UNSAccountB join UNSRootB r on a.UID_UNSRootB = r.UID_UNSRootB and r.GroupUsageMask & 0x08 > 42 0 where isnull(d.IsGroupAccount_UNSGroupB3,0) <> isnull(a.IsGroupAccount_UNSGroupB3,0) and a.UID_Person > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB3' 43, @DBQueueElements_10 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH return end 44
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.833
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, UNSAccountB, UNSRootB
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-PersonHasObject TSB-K-UNSAccountBInUNSGroupB TSB-K-UNSAccountBInUNSGroupB1 TSB-K-UNSAccountBInUNSGroupB2 TSB-K-UNSAccountBInUNSGroupB3Temp tables / referenced variables
Temp: None extracted.
Variables: @GenProcID @QBM_BitPatternXMarkedForDel_OutStanding @DBQueueElements_01 @DBQueueElements_03 @DBQueueElements_04 @DBQueueElements_05 @DBQueueElements_06 @DBQueueElements_07 @DBQueueElements_08 @DBQueueElements_09 @DBQueueElements_10
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.