dbo.ADS_ZOrgHasADSGroup

SQL_STORED_PROCEDURE

Created 2025-06-27T18:01:23.123 · modified 2026-04-14T23:20:48.657 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
ADSGroupOBJECT_OR_COLUMN
ADSGroupExclusionOBJECT_OR_COLUMN
BaseTreeOBJECT_OR_COLUMN
BaseTreeCollectionOBJECT_OR_COLUMN
BaseTreeHasADSGroupOBJECT_OR_COLUMN
BaseTreeHasEsetOBJECT_OR_COLUMN
ESetHasEntitlementOBJECT_OR_COLUMN
OrgRootAssignOBJECT_OR_COLUMN
QBM_PDBQueueCalculateDeltaOBJECT_OR_COLUMN
QBM_PDBQueueInsert_BulkOBJECT_OR_COLUMN
QBM_PMNTableInsertOBJECT_OR_COLUMN
QBM_PMNTableOriginUpdateOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YDataForDeltaTYPE
QBM_YDBQueueCurrentTYPE
QBM_YDBQueueRawTYPE
QBMDBQueueCurrentOBJECT_OR_COLUMN
QER_PMNTableAddViewPropertiesOBJECT_OR_COLUMN
QER_YExcludeCandidateTYPE
dboQBM_FGIBitPatternXOriginOBJECT_OR_COLUMN
dboQBM_FGIConfigparmValueOBJECT_OR_COLUMN
dboQBM_FGIModuleExistsOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1       create   procedure ADS_ZOrgHasADSGroup (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin
2 int declare @GenProcID varchar(38) declare @UID_BasetreeAssignToUse varchar(38) = 'ADS-AsgnBT-ADSGroup' declare @DBQueueCurrent QBM_YDBQueueCurrent declare
3 @QBM_BitPatternXOrigin_Inherit int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 0)  declare @QBM_BitPatternXOrigin_Inherit_inv int = dbo.QBM_FGIBitPatternXOrigin
4('|Inherit|', 1)  BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter
5, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end insert
6 into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore , XIsInEffectBefore ) select 0, 0 , uid_org, uid_ADSgroup
7, XOrigin , XIsInEffect from BaseTreeHasADSGroup join @DBQueueCurrent x on uid_org =x.uid_parameter insert into @SourceData( IsUpcommingContent, XOriginBefore
8, XOriginAfter , Element, AssignedElement , XIsInEffectAfter ) select 1, 0, ohg.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv , x.uid_parameter, ohg.uid_ADSgroup
9 , 1 from BaseTreeHasADSGroup ohg join @DBQueueCurrent x on ohg.uid_org = x.uid_parameter  where ohg.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv > 0 insert
10 into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter , XIsInEffectAfter ) select 1, 0 , x.uid_parameter, ohg.uid_ADSgroup
11, @QBM_BitPatternXOrigin_Inherit , 1 from BaseTreeHasADSGroup ohg join BaseTreeCollection oc on ohg.uid_org = oc.uid_parentorg  and ohg.XIsInEffect = 1
12 join ADSGroup gg on ohg.uid_ADSGroup = gg.UID_ADSGroup  join @DBQueueCurrent x on oc.uid_org = x.uid_parameter where oc.uid_org <> oc.uid_parentorg  and
13 ohg.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv > 0 if dbo.QBM_FGIModuleExists('RMS') = 1 begin if dbo.QBM_FGIConfigparmValue('QER\Structures\Inherite\NoESetSplitting'
14) = '' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter , XIsInEffectAfter ) select 1, 0 , x.uid_parameter
15, y.uid_ADSGroup, @QBM_BitPatternXOrigin_Inherit  , 1 from @DBQueueCurrent x join BaseTreeHasEset bhe on x.uid_Parameter = bhe.uid_org and bhe.XOrigin 
16> 0 and bhe.XIsInEffect = 1 join ESetHasEntitlement ehe on bhe.uid_ESet = ehe.uid_ESet and ehe.XOrigin > 0 and ehe.XIsInEffect = 1 join ADSGroup y on ehe.entitlement
17 = y.XObjectKey join BaseTree b on bhe.UID_Org = b.UID_Org  and not (b.UID_OrgRoot in ( 'QER-V-ITShopOrg', 'QER-V-ITShopSrc') and b.ITShopInfo in ( 'BO'
18, 'PR', 'BG', 'BT') ) join OrgRootAssign oa on oa.UID_OrgRoot = b.UID_OrgRoot and oa.UID_BaseTreeAssign = @UID_BasetreeAssignToUse and oa.IsAssignmentAllowed
19 = 1 end  else begin  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, x.GenProcID
20 from ( select cu.UID_Parameter as uid, cu.GenProcID from @DBQueueCurrent cu ) as x exec QBM_PDBQueueInsert_Bulk 'ADS-K-BaseTreeHasObject', @DBQueueElements_01
21 end end  if dbo.QBM_FGIConfigparmValue('QER\Structures\Inherite\GroupExclusion') > ' ' begin if exists (select top 1 1 from ADSGroupExclusion ex with 
22(nolock) join @Sourcedata s on ex.UID_ADSGroupLower  = s.AssignedElement where s.IsUpcommingContent = 1 and s.XOriginAfter > 0 and s.XIsInEffectAfter =
23 1 ) begin declare @ExcludeCandidate QER_YExcludeCandidate insert into @ExcludeCandidate(Element, AssignedElement, XIsInEffectAfter) select s.Element, 
24s.AssignedElement, 1 from @Sourcedata s join ( select exe.UID_ADSGroupLower as UID_Excluded from ADSGroupExclusion exe ) as ex on s.AssignedElement = ex.UID_Excluded
25 where s.IsUpcommingContent = 1 and s.XOriginAfter > 0 and s.XIsInEffectAfter = 1 union all select s.Element, s.AssignedElement, 1 from @Sourcedata s join
26 ( select exe.UID_ADSGroupHigher as UID_Excluding from ADSGroupExclusion exe ) as ex on s.AssignedElement = ex.UID_Excluding where s.IsUpcommingContent
27 = 1 and s.XOriginAfter > 0 and s.XIsInEffectAfter = 1  delete  @ExcludeCandidate from @ExcludeCandidate ex where exists (select top 1 1 from BaseTree 
28b where ex.Element = b.UID_Org and b.UID_OrgRoot in ( 'QER-V-ITShopOrg', 'QER-V-ITShopSrc') and b.ITShopInfo in ( 'BO',  'BG', 'BT') )  update @ExcludeCandidate
29 set XIsInEffectAfter = 0 from @ExcludeCandidate l  join ( select exe.UID_ADSGroupLower as UID_Excluded, exe.UID_ADSGroupHigher as UID_Excluding from ADSGroupExclusion
30 exe ) as ex on l.AssignedElement = ex.UID_Excluded join (select sh.* from @ExcludeCandidate sh  ) as h on l.Element = h.Element and h.AssignedElement 
31= ex.UID_Excluding if @@ROWCOUNT > 0 begin update @Sourcedata set XIsInEffectAfter = 0 from @Sourcedata l join @ExcludeCandidate k on l.Element = k.Element
32 and l.AssignedElement = k.AssignedElement and k.XIsInEffectAfter = 0 where l.IsUpcommingContent = 1 and l.XOriginAfter > 0 and l.XIsInEffectAfter = 1 
33end end  end   exec QBM_PDBQueueCalculateDelta @SourceData, @DeltaQuantity = 0, @DeltaDelete = 0, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity
34 = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin output , @UseIsInEffect = 1 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = 
35@DBQueueCurrent if @CountDeltaOrigin > 0 begin exec QBM_PMNTableOriginUpdate 'BaseTreeHasADSGroup', 'uid_org', 'uid_adsGroup' end if @CountDeltaQantity
36 > 0 begin exec QER_PMNTableAddViewProperties 'BaseTreeHasADSGroup' exec QBM_PMNTableInsert 'BaseTreeHasADSGroup', 'uid_org', 'uid_adsGroup', @TargetIsView
37 = 1 , @FKTableNameElement = 'BaseTree' , @FKColumnNameElement = 'UID_Org' end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18,
38 1) WITH NOWAIT END CATCH endLabel: end 
39

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.657

inserts DBQueue tasks has TRY/CATCH error handling

Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PDBQueueCalculateDelta, QBM_PMNTableOriginUpdate, QER_PMNTableAddViewProperties, QBM_PMNTableInsert…; writes INSERT into; reads/joins QBMDBQueueCurrent, BaseTreeHasADSGroup, BaseTreeCollection, ADSGroup, BaseTreeHasEset…; uses config QER\Structures\Inherite\NoESetSplitting, QER\Structures\Inherite\GroupExclusion

Declared parameters

ParameterTypeDirection
@SlotNumberintinput

DML targets

INSERT into

Config/session

Config: QER\Structures\Inherite\NoESetSplitting QER\Structures\Inherite\GroupExclusion

Session: None extracted.

DBQueue/tasks

ADS-K-BaseTreeHasObject

Temp tables / referenced variables

Temp: None extracted.

Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @GenProcID @UID_BasetreeAssignToUse @DBQueueCurrent @QBM_BitPatternXOrigin_Inherit @QBM_BitPatternXOrigin_Inherit_inv @rowcount @SourceData @DBQueueElements_01 @ExcludeCandidate @ROWCOUNT @DeltaQuantity @DeltaDelete @DeltaInsert @DeltaOrigin @UseIsInEffect @DBQueueCurrentExtern @TargetIsView @FKTableNameElement @FKColumnNameElement

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.