dbo.ADS_ZPersonHasObject
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:23.167 · modified 2026-04-14T23:20:48.720 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| ADSAccount | OBJECT_OR_COLUMN | ||
| ADSAccountInADSGroup | OBJECT_OR_COLUMN | ||
| ADSContact | OBJECT_OR_COLUMN | ||
| ADSContactInADSGroup | OBJECT_OR_COLUMN | ||
| ADSGroup | OBJECT_OR_COLUMN | ||
| ADSGroupCollection | OBJECT_OR_COLUMN | ||
| person | OBJECT_OR_COLUMN | ||
| PersonHasObject | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueCalculateDelta | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDataForDelta | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| QER_PPersonHasObjectPostProc | OBJECT_OR_COLUMN | ||
| TSBPersonUsesAccount | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIBitPatternXMarkedForDel | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QER_FCVXOriginToInheritInfo | OBJECT_OR_COLUMN | |
| dbo | QER_FGIBitPatternInheritInfo | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure ADS_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>ADSAccount</T>%' 9 or pho.ObjectKey like '<Key><T>ADSGroup</T>%' or pho.ObjectKey like '<Key><T>ADSContact</T>%' insert into @SourceData( IsUpcommingContent, XOriginBefore 10 , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, y.XObjectKey, @QER_BitPatternInherit_Direct from ADSAccount y join @DBQueueCurrent 11 x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' union all select 1, 0 , y.uid_person, y.XObjectKey, @QER_BitPatternInherit_Direct from ADSContact 12 y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' if @IncludeTSBPersonUsesAccount = '1' begin insert into @SourceData( 13 IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, y.ObjectKeyAccount, @QER_BitPattern_Inherit_0 14 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person= x.uid_parameter join ADSAccount a on y.ObjectKeyAccount = a.XObjectKey insert into 15 @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, y.ObjectKeyAccount, @QER_BitPattern_Inherit_0 16 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person= x.uid_parameter join ADSContact a on y.ObjectKeyAccount = a.XObjectKey end insert 17 into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo 18(z.XOrigin) from ADSAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter and y.UID_Person > ' ' join ADSAccountInADSGroup z on y.uid_ADSAccount 19 = z.uid_ADSAccount and z.XOrigin > 0 and z.XIsInEffect = 1 join ADSGroup q on q.uid_ADSGroup = z.uid_ADSGroup where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 20 = 0 union all select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from ADSContact y join @DBQueueCurrent x on y.uid_person 21 = x.uid_parameter and y.UID_Person > ' ' join ADSContactInADSGroup z on y.UID_ADSContact = z.UID_ADSContact and z.XOrigin > 0 and z.XIsInEffect = 1 join 22 ADSGroup q on q.uid_ADSGroup = z.uid_ADSGroup where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 if @IncludeTSBPersonUsesAccount = '1' 23 begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, 24@QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter join ADSAccount a on y.ObjectKeyAccount 25= a.XObjectKey join ADSAccountInADSGroup z on a.uid_ADSAccount = z.uid_ADSAccount and z.XOrigin > 0 and z.XIsInEffect = 1 join ADSGroup q on q.uid_ADSGroup 26 = z.uid_ADSGroup where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 insert into @SourceData( IsUpcommingContent, XOriginBefore , Element 27, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent 28x on y.uid_person = x.uid_parameter join ADSContact a on y.ObjectKeyAccount = a.XObjectKey join ADSContactInADSGroup z on a.uid_ADSContact = z.uid_ADSContact 29 and z.XOrigin > 0 and z.XIsInEffect = 1 join ADSGroup q on q.uid_ADSGroup = z.uid_ADSGroup where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay 30 = 0 end insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey 31, ( @QER_BitPatternInherit_Direct ) as XOrigin from ADSAccount y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and y.UID_Person > ' ' join ADSGroup 32 q on q.uid_ADSGroup = y.UID_ADSGroupPrimary if @IncludeTSBPersonUsesAccount = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , 33Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, @QER_BitPatternInherit_Direct from TSBPersonUsesAccount y join @DBQueueCurrent 34 x on y.uid_person = x.uid_parameter join ADSAccount a on y.ObjectKeyAccount = a.XObjectKey join ADSGroup q on q.uid_ADSGroup = a.UID_ADSGroupPrimary end 35 insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 36 from ( select distinct ho.Element, p.XObjectKey from @SourceData ho join ADSGroup g on ho.AssignedElement = g.XObjectKey join ADSGroupCollection co on 37 co.UID_ADSGroupChild = g.uid_ADSGroup join ADSGroup p on co.UID_ADSGroupParent = p.UID_ADSGroup where ho.IsUpcommingContent = 1 and co.UID_ADSGroupChild 38 <> co.UID_ADSGroupParent ) as t insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 391, 0 , m.uid_person, pho.objectkey, @QER_BitPatternInherit_Master from @DBQueueCurrent x join person m on m.UID_Person = x.uid_parameter join person s 40 on s.UID_PersonMasterIdentity = m.uid_Person join PersonHasObject pho on pho.uid_person = s.uid_person where pho.ObjectKey like '<Key><T>ADSAccount</T>%' 41 or pho.ObjectKey like '<Key><T>ADSGroup</T>%' or pho.ObjectKey like '<Key><T>ADSContact</T>%' if @IncludeTSBPersonUsesAccount = '1' begin insert into 42 @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , m.uid_person, pho.ObjectKey, @QER_BitPatternInherit_Master 43 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter join person m on m.UID_Person = y.uid_person join person s on s.UID_PersonMasterIdentity 44 = m.uid_Person join PersonHasObject pho on pho.uid_person = s.uid_person where pho.ObjectKey like '<Key><T>ADSAccount</T>%' or pho.ObjectKey like '<Key><T>ADSGroup</T>%' 45 or pho.ObjectKey like '<Key><T>ADSContact</T>%' end berechnen: exec QBM_PDBQueueCalculateDelta @SourceData, @DeltaQuantity = 1, @DeltaDelete = 1, @DeltaInsert 46 = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin output , @UseIsInEffect = 0 , @SlotNumber 47 = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent exec QER_PPersonHasObjectPostProc @SlotNumber , @CountDeltaOrigin , @CountDeltaQantity , 'ADS-K-PersonHasObject' 48 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end 49
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:48.720
has TRY/CATCH error handling
Summary: calls QBM_PDBQueueCalculateDelta, QER_PPersonHasObjectPostProc, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, PersonHasObject, ADSAccount, ADSContact, TSBPersonUsesAccount…; uses config QER\ComplianceCheck\IncludeTSBPersonUsesAccount
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT intoRead/join references
SQL dependency metadata
- ADSAccount
- ADSAccountInADSGroup
- ADSContact
- ADSContactInADSGroup
- ADSGroup
- ADSGroupCollection
- person
- PersonHasObject
- QBM_PDBQueueCalculateDelta
- QBM_PSessionErrorAdd
- QBM_YDataForDelta
- QBM_YDBQueueCurrent
- QBMDBQueueCurrent
- QER_PPersonHasObjectPostProc
- TSBPersonUsesAccount
- dbo.QBM_FGIBitPatternXMarkedForDel
- dbo.QBM_FGIConfigparmValue
- dbo.QER_FCVXOriginToInheritInfo
- dbo.QER_FGIBitPatternInheritInfo
Config/session
Config: QER\ComplianceCheck\IncludeTSBPersonUsesAccount
Session: None extracted.
DBQueue/tasks
ADS-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.