dbo.TSB_ZPersonHasObject
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:20.773 · modified 2026-04-14T23:20:46.487 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure TSB_ZPersonHasObject (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin 2 int declare @QER_BitPattern_Inherit_0 int = dbo.QER_FGIBitPatternInheritInfo('|Inherit|', 0) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXMarkedForDel_Delay 3 int = dbo.QBM_FGIBitPatternXMarkedForDel('|Delay|', 0) declare @QER_BitPatternInherit_Direct int = dbo.QER_FGIBitPatternInheritInfo('|Direct|', 0) declare 4 @QER_BitPatternInherit_Master int = dbo.QER_FGIBitPatternInheritInfo('|Master|', 0) declare @IncludeTSBPersonUsesAccount nvarchar(1024) = dbo.QBM_FGIConfigparmValue 5('QER\ComplianceCheck\IncludeTSBPersonUsesAccount') BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID 6) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount 7 = 0 begin goto EndLabel end insert into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , pho.UID_Person 8, pho.ObjectKey, pho.InheritInfo from PersonHasObject pho join @DBQueueCurrent x on pho.UID_Person = x.uid_parameter where pho.ObjectKey like '<Key><T>UNSAccountB</T>%' 9 or pho.ObjectKey like '<Key><T>UNSGroupB</T>%' or pho.ObjectKey like '<Key><T>UNSGroupB1</T>%' or pho.ObjectKey like '<Key><T>UNSGroupB2</T>%' or pho.ObjectKey 10 like '<Key><T>UNSGroupB3</T>%' or pho.ObjectKey like '<Key><T>TSBAccountDef</T>%' insert into @SourceData( IsUpcommingContent, XOriginBefore , Element 11, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, y.XObjectKey, @QER_BitPatternInherit_Direct from UNSAccountB y join @DBQueueCurrent x on 12y.uid_person= x.uid_parameter and y.UID_Person > ' ' if @IncludeTSBPersonUsesAccount = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore 13 , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, y.ObjectKeyAccount, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join 14@DBQueueCurrent x on y.uid_person= x.uid_parameter join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey end insert into @SourceData( IsUpcommingContent 15, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from UNSAccountB 16 y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' join UNSAccountBInUNSGroupB z on y.uid_UNSAccountB = z.uid_UNSAccountB 17 and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB q on q.uid_UNSGroupB = z.uid_UNSGroupB where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 18 = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= 19 x.uid_parameter and y.UID_Person > ' ' join UNSAccountBInUNSGroupB1 z on y.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 20 join UNSGroupB1 q on q.uid_UNSGroupB1 = z.uid_UNSGroupB1 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 union all select 1, 0 , 21y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person 22 > ' ' join UNSAccountBInUNSGroupB2 z on y.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB2 q on q.uid_UNSGroupB2 23 = z.uid_UNSGroupB2 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo 24(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' join UNSAccountBInUNSGroupB3 z on y.uid_UNSAccountB 25 = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB3 q on q.uid_UNSGroupB3 = z.uid_UNSGroupB3 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 26 = 0 insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo 27(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' join UNSAccountBHasUNSGroupB z on y.uid_UNSAccountB 28 = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB q on q.uid_UNSGroupB = z.uid_UNSGroupB where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 29 = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= 30 x.uid_parameter and y.UID_Person > ' ' join UNSAccountBHasUNSGroupB1 z on y.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 311 join UNSGroupB1 q on q.uid_UNSGroupB1 = z.uid_UNSGroupB1 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 union all select 1, 0 , 32 y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and 33y.UID_Person > ' ' join UNSAccountBHasUNSGroupB2 z on y.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB2 q 34on q.uid_UNSGroupB2 = z.uid_UNSGroupB2 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 union all select 1, 0 , y.uid_person, q.XObjectKey 35, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from UNSAccountB y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' join UNSAccountBHasUNSGroupB3 36 z on y.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB3 q on q.uid_UNSGroupB3 = z.uid_UNSGroupB3 where z.XMarkedForDeletion 37 & @QBM_BitPatternXMarkedForDel_Delay = 0 if @IncludeTSBPersonUsesAccount = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element 38, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent 39x on y.uid_person = x.uid_parameter join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBInUNSGroupB z on a.uid_UNSAccountB = z.uid_UNSAccountB 40 and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB q on q.uid_UNSGroupB = z.uid_UNSGroupB where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 41 = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = 42 x.uid_parameter join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBInUNSGroupB1 z on a.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin 43 > 0 and z.XIsInEffect = 1 join UNSGroupB1 q on q.uid_UNSGroupB1 = z.uid_UNSGroupB1 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 440 union all select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter 45 join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBInUNSGroupB2 z on a.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and 46z.XIsInEffect = 1 join UNSGroupB2 q on q.uid_UNSGroupB2 = z.uid_UNSGroupB2 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 union all 47 select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter 48 join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBInUNSGroupB3 z on a.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and 49z.XIsInEffect = 1 join UNSGroupB3 q on q.uid_UNSGroupB3 = z.uid_UNSGroupB3 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 insert 50 into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 51 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBHasUNSGroupB 52 z on a.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB q on q.uid_UNSGroupB = z.uid_UNSGroupB where z.XMarkedForDeletion 53 & @QBM_BitPatternXMarkedForDel_Delay = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join 54 @DBQueueCurrent x on y.uid_person = x.uid_parameter join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBHasUNSGroupB1 z on a.uid_UNSAccountB 55 = z.uid_UNSAccountB and z.XOrigin > 0 and z.XIsInEffect = 1 join UNSGroupB1 q on q.uid_UNSGroupB1 = z.uid_UNSGroupB1 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 56 = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = 57 x.uid_parameter join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBHasUNSGroupB2 z on a.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin 58 > 0 and z.XIsInEffect = 1 join UNSGroupB2 q on q.uid_UNSGroupB2 = z.uid_UNSGroupB2 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 590 union all select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter 60 join UNSAccountB a on y.ObjectKeyAccount = a.XObjectKey join UNSAccountBHasUNSGroupB3 z on a.uid_UNSAccountB = z.uid_UNSAccountB and z.XOrigin > 0 and 61 z.XIsInEffect = 1 join UNSGroupB3 q on q.uid_UNSGroupB3 = z.uid_UNSGroupB3 where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 end insert 62 into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo 63(y.XOrigin) from PersonHasTSBAccountDef y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join TSBAccountDef 64 z on y.UID_TSBAccountDef = z.UID_TSBAccountDef where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 insert into @SourceData( IsUpcommingContent 65, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from ( select ho.Element, 66p.XObjectKey from @SourceData ho join UNSGroupB g on ho.AssignedElement = g.XObjectKey join UNSGroupBCollection co on co.UID_UNSGroupBChild = g.uid_UNSGroupB 67 join UNSGroupB p on co.UID_UNSGroupBParent = p.UID_UNSGroupB where ho.IsUpcommingContent = 1 and co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent union 68 select ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB1 g on ho.AssignedElement = g.XObjectKey join UNSGroupB1Collection co on co.UID_UNSGroupB1Child 69 = g.uid_UNSGroupB1 join UNSGroupB1 p on co.UID_UNSGroupB1Parent = p.UID_UNSGroupB1 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB1Child <> co.UID_UNSGroupB1Parent 70 union select ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB2 g on ho.AssignedElement = g.XObjectKey join UNSGroupB2Collection co on co.UID_UNSGroupB2Child 71 = g.uid_UNSGroupB2 join UNSGroupB2 p on co.UID_UNSGroupB2Parent = p.UID_UNSGroupB2 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB2Child <> co.UID_UNSGroupB2Parent 72 union select ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB3 g on ho.AssignedElement = g.XObjectKey join UNSGroupB3Collection co on co.UID_UNSGroupB3Child 73 = g.uid_UNSGroupB3 join UNSGroupB3 p on co.UID_UNSGroupB3Parent = p.UID_UNSGroupB3 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB3Child <> co.UID_UNSGroupB3Parent 74 ) as t insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , m.uid_person, pho.objectkey 75, @QER_BitPatternInherit_Master from @DBQueueCurrent x join person m on m.UID_Person = x.uid_parameter join person s on s.UID_PersonMasterIdentity = m.uid_Person 76 join PersonHasObject pho on pho.uid_person = s.uid_person where pho.ObjectKey like '<Key><T>UNSAccountB</T>%' or pho.ObjectKey like '<Key><T>UNSGroupB</T>%' 77 or pho.ObjectKey like '<Key><T>UNSGroupB1</T>%' or pho.ObjectKey like '<Key><T>UNSGroupB2</T>%' or pho.ObjectKey like '<Key><T>UNSGroupB3</T>%' if @IncludeTSBPersonUsesAccount 78 = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , m.uid_person, pho.ObjectKey 79, @QER_BitPatternInherit_Master from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter join person m on m.UID_Person = y.uid_person 80 join person s on s.UID_PersonMasterIdentity = m.uid_Person join PersonHasObject pho on pho.uid_person = s.uid_person where pho.ObjectKey like '<Key><T>UNSAccountB</T>%'
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:20:46.487
has TRY/CATCH error handling
Summary: calls QBM_PDBQueueCalculateDelta, QER_PPersonHasObjectPostProc, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, PersonHasObject, UNSAccountB, TSBPersonUsesAccount, UNSAccountBInUNSGroupB…; uses config QER\ComplianceCheck\IncludeTSBPersonUsesAccount
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT intoRead/join references
- QBMDBQueueCurrent
- PersonHasObject
- UNSAccountB
- TSBPersonUsesAccount
- UNSAccountBInUNSGroupB
- UNSGroupB
- UNSAccountBInUNSGroupB1
- UNSGroupB1
- UNSAccountBInUNSGroupB2
- UNSGroupB2
- UNSAccountBInUNSGroupB3
- UNSGroupB3
- UNSAccountBHasUNSGroupB
- UNSAccountBHasUNSGroupB1
- UNSAccountBHasUNSGroupB2
- UNSAccountBHasUNSGroupB3
- PersonHasTSBAccountDef
- TSBAccountDef
- UNSGroupBCollection
- UNSGroupB1Collection
- UNSGroupB2Collection
- UNSGroupB3Collection
- person
SQL dependency metadata
- person
- PersonHasObject
- PersonHasTSBAccountDef
- QBM_PDBQueueCalculateDelta
- QBM_PSessionErrorAdd
- QBM_YDataForDelta
- QBM_YDBQueueCurrent
- QBMDBQueueCurrent
- QER_PPersonHasObjectPostProc
- TSBAccountDef
- TSBPersonUsesAccount
- UNSAccountB
- UNSAccountBHasUNSGroupB
- UNSAccountBHasUNSGroupB1
- UNSAccountBHasUNSGroupB2
- UNSAccountBHasUNSGroupB3
- UNSAccountBInUNSGroupB
- UNSAccountBInUNSGroupB1
- UNSAccountBInUNSGroupB2
- UNSAccountBInUNSGroupB3
- UNSGroupB
- UNSGroupB1
- UNSGroupB1Collection
- UNSGroupB2
- UNSGroupB2Collection
- UNSGroupB3
- UNSGroupB3Collection
- UNSGroupBCollection
- dbo.QBM_FGIBitPatternXMarkedForDel
- dbo.QBM_FGIConfigparmValue
- dbo.QER_FCVXOriginToInheritInfo
- dbo.QER_FGIBitPatternInheritInfo
Config/session
Config: QER\ComplianceCheck\IncludeTSBPersonUsesAccount
Session: None extracted.
DBQueue/tasks
TSB-K-PersonHasObjectTemp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @QER_BitPattern_Inherit_0 @DBQueueCurrent @QBM_BitPatternXMarkedForDel_Delay @QER_BitPatternInherit_Direct @QER_BitPatternInherit_Master @IncludeTSBPersonUsesAccount @rowcount @SourceData @DeltaQuantity @DeltaDelete @DeltaInsert @DeltaOrigin @UseIsInEffect @DBQueueCurrentExtern
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.