dbo.LDP_ZPersonHasObject
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_FGIBitPatternXMarkedForDel source text reference
- references source dbo.QBM_FGIConfigparmValue source text reference
- references source dbo.QER_FCVXOriginToInheritInfo source text reference
- references source dbo.QER_FGIBitPatternInheritInfo source text reference
- references source dbo.QBM_PDBQueueCalculateDelta source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_PPersonHasObjectPostProc source text reference
References
- dbo.QBM_FGIBitPatternXMarkedForDel
- dbo.QBM_FGIConfigparmValue
- dbo.QER_FCVXOriginToInheritInfo
- dbo.QER_FGIBitPatternInheritInfo
- dbo.QBM_PDBQueueCalculateDelta
- dbo.QBM_PSessionErrorAdd
- dbo.QER_PPersonHasObjectPostProc
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE LDP_ZPersonHasObject(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @Sourcedata QBM_YDataForDelta,7 @CountDeltaQantity int,8 @CountDeltaOrigin int9 DECLARE @QER_BitPattern_Inherit_0 int = dbo.QER_FGIBitPatternInheritInfo('|Inherit|',10 0)11 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent12 DECLARE @QBM_BitPatternXMarkedForDel_Delay int = dbo.QBM_FGIBitPatternXMarkedForDel('|Delay|',13 0)14 DECLARE @QER_BitPatternInherit_Direct int = dbo.QER_FGIBitPatternInheritInfo('|Direct|',15 0)16 DECLARE @QER_BitPatternInherit_Master int = dbo.QER_FGIBitPatternInheritInfo('|Master|',17 0)18 DECLARE @IncludeTSBPersonUsesAccount nvarchar(1024) = dbo.QBM_FGIConfigparmValue('QER\ComplianceCheck\IncludeTSBPersonUsesAccount')19 BEGIN TRY20 INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,21 UID_Parameter,22 UID_SubParameter,23 GenProcID)24 SELECT25 UID_DialogDBQueue,26 UID_Parameter,27 UID_SubParameter,28 GenProcID29 FROM QBMDBQueueCurrent cu30 WITH(readpast)31 WHERE32 cu.SlotNumber = @SlotNumber33 IF @@rowcount = 034 BEGIN35 GOTO EndLabel36 END37 INSERT INTO @SourceData(IsUpcommingContent,38 XOriginAfter,39 Element,40 AssignedElement,41 XOriginBefore)42 SELECT43 0,44 0,45 pho.UID_Person,46 pho.ObjectKey,47 pho.InheritInfo48 FROM PersonHasObject pho49 JOIN @DBQueueCurrent x50 ON pho.UID_Person = x.uid_parameter51 WHERE52 pho.ObjectKey LIKE '<Key><T>LDAPAccount</T>%' OR pho.ObjectKey LIKE '<Key><T>LDAPGroup</T>%'53 INSERT INTO @SourceData(IsUpcommingContent,54 XOriginBefore,55 Element,56 AssignedElement,57 XOriginAfter)58 SELECT59 1,60 0,61 y.uid_person,62 y.XObjectKey,63 @QER_BitPatternInherit_Direct64 FROM LDAPAccount y65 JOIN @DBQueueCurrent x66 ON y.uid_person= x.uid_parameter AND y.UID_Person > ' '67 IF @IncludeTSBPersonUsesAccount = '1'68 BEGIN69 INSERT INTO @SourceData(IsUpcommingContent,70 XOriginBefore,71 Element,72 AssignedElement,73 XOriginAfter)74 SELECT75 1,76 0,77 y.uid_person,78 y.ObjectKeyAccount,79 @QER_BitPattern_Inherit_080 FROM TSBPersonUsesAccount y81 JOIN @DBQueueCurrent x82 ON y.uid_person= x.uid_parameter83 JOIN LDAPAccount a84 ON y.ObjectKeyAccount = a.XObjectKey85 END86 INSERT INTO @SourceData(IsUpcommingContent,87 XOriginBefore,88 Element,89 AssignedElement,90 XOriginAfter)91 SELECT92 1,93 0,94 y.uid_person,95 q.XObjectKey,96 dbo.QER_FCVXOriginToInheritInfo(z.XOrigin)97 FROM LDAPAccount y98 JOIN @DBQueueCurrent x99 ON y.uid_person= x.uid_parameter AND y.UID_Person > ' '100 JOIN LDAPAccountInLDAPGroup z101 ON y.uid_LDAPAccount = z.uid_LDAPAccount AND z.XOrigin > 0 AND z.XIsInEffect = 1102 JOIN LDAPGroup q103 ON q.uid_LDAPGroup = z.uid_LDAPGroup104 WHERE105 z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0106 IF @IncludeTSBPersonUsesAccount = '1'107 BEGIN108 INSERT INTO @SourceData(IsUpcommingContent,109 XOriginBefore,110 Element,111 AssignedElement,112 XOriginAfter)113 SELECT114 1,115 0,116 y.uid_person,117 q.XObjectKey,118 @QER_BitPattern_Inherit_0119 FROM TSBPersonUsesAccount y120 JOIN @DBQueueCurrent x121 ON y.uid_person = x.uid_parameter122 JOIN LDAPAccount a123 ON y.ObjectKeyAccount = a.XObjectKey124 JOIN LDAPAccountInLDAPGroup z125 ON a.uid_LDAPAccount = z.uid_LDAPAccount AND z.XOrigin > 0 AND z.XIsInEffect = 1126 JOIN LDAPGroup q127 ON q.uid_LDAPGroup = z.uid_LDAPGroup128 WHERE129 z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0130 END131 INSERT INTO @SourceData(IsUpcommingContent,132 XOriginBefore,133 Element,134 AssignedElement,135 XOriginAfter)136 SELECT137 1,138 0,139 t.Element,140 t.XObjectKey,141 @QER_BitPattern_Inherit_0142 FROM(143 SELECT144 DISTINCT ho.Element,145 p.XObjectKey146 FROM @SourceData ho147 JOIN LDAPGroup g148 ON ho.AssignedElement = g.XObjectKey149 JOIN LDAPGroupCollection co150 ON co.UID_LDAPGroupChild = g.uid_LDAPGroup151 JOIN LDAPGroup p152 ON co.UID_LDAPGroupParent = p.UID_LDAPGroup153 WHERE154 ho.IsUpcommingContent = 1 AND co.UID_LDAPGroupChild <> co.UID_LDAPGroupParent) AS t155 INSERT INTO @SourceData(IsUpcommingContent,156 XOriginBefore,157 Element,158 AssignedElement,159 XOriginAfter)160 SELECT161 1,162 0,163 m.uid_person,164 pho.objectkey,165 @QER_BitPatternInherit_Master166 FROM @DBQueueCurrent x167 JOIN person m168 ON m.UID_Person = x.uid_parameter169 JOIN person s170 ON s.UID_PersonMasterIdentity = m.uid_Person171 JOIN PersonHasObject pho172 ON pho.uid_person = s.uid_person173 WHERE174 pho.ObjectKey LIKE '<Key><T>LDAPAccount</T>%' OR pho.ObjectKey LIKE '<Key><T>LDAPGroup</T>%'175 IF @IncludeTSBPersonUsesAccount = '1'176 BEGIN177 INSERT INTO @SourceData(IsUpcommingContent,178 XOriginBefore,179 Element,180 AssignedElement,181 XOriginAfter)182 SELECT183 1,184 0,185 m.uid_person,186 pho.ObjectKey,187 @QER_BitPatternInherit_Master188 FROM TSBPersonUsesAccount y189 JOIN @DBQueueCurrent x190 ON y.uid_person = x.uid_parameter191 JOIN person m192 ON m.UID_Person = y.uid_person193 JOIN person s194 ON s.UID_PersonMasterIdentity = m.uid_Person195 JOIN PersonHasObject pho196 ON pho.uid_person = s.uid_person197 WHERE198 pho.ObjectKey LIKE '<Key><T>LDAPAccount</T>%' OR pho.ObjectKey LIKE '<Key><T>LDAPGroup</T>%'199 END200 berechnen:201 EXEC QBM_PDBQueueCalculateDelta @SourceData,202 @DeltaQuantity = 1,203 @DeltaDelete = 1,204 @DeltaInsert = 1,205 @DeltaOrigin = 1,206 @CountDeltaQantity = @CountDeltaQantity OUTPUT,207 @CountDeltaOrigin = @CountDeltaOrigin OUTPUT,208 @UseIsInEffect = 0,209 @SlotNumber = @SlotNumber,210 @DBQueueCurrentExtern = @DBQueueCurrent211 EXEC QER_PPersonHasObjectPostProc @SlotNumber,212 @CountDeltaOrigin,213 @CountDeltaQantity,214 'LDP-K-PersonHasObject'215 END TRY216 BEGIN CATCH217 EXEC QBM_PSessionErrorAdd DEFAULT218 RAISERROR('',219 18,220 1)221 WITH NOWAIT222 END CATCH223 endLabel:224END
Open raw exported source
1 create procedure LDP_ZPersonHasObject (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin2 int declare @QER_BitPattern_Inherit_0 int = dbo.QER_FGIBitPatternInheritInfo('|Inherit|', 0) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXMarkedForDel_Delay3 int = dbo.QBM_FGIBitPatternXMarkedForDel('|Delay|', 0) declare @QER_BitPatternInherit_Direct int = dbo.QER_FGIBitPatternInheritInfo('|Direct|', 0) declare4 @QER_BitPatternInherit_Master int = dbo.QER_FGIBitPatternInheritInfo('|Master|', 0) declare @IncludeTSBPersonUsesAccount nvarchar(1024) = dbo.QBM_FGIConfigparmValue5('QER\ComplianceCheck\IncludeTSBPersonUsesAccount') BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID6) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount7 = 0 begin goto EndLabel end insert into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , pho.UID_Person8, pho.ObjectKey, pho.InheritInfo from PersonHasObject pho join @DBQueueCurrent x on pho.UID_Person = x.uid_parameter where pho.ObjectKey like '<Key><T>LDAPAccount</T>%'9 or pho.ObjectKey like '<Key><T>LDAPGroup</T>%' insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) 10select 1, 0 , y.uid_person, y.XObjectKey, @QER_BitPatternInherit_Direct from LDAPAccount y join @DBQueueCurrent x on y.uid_person= x.uid_parameter and 11y.UID_Person > ' ' if @IncludeTSBPersonUsesAccount = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, 12XOriginAfter ) select 1, 0 , y.uid_person, y.ObjectKeyAccount, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person=13 x.uid_parameter join LDAPAccount a on y.ObjectKeyAccount = a.XObjectKey end insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement14, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(z.XOrigin) from LDAPAccount y join @DBQueueCurrent x on y.uid_person=15 x.uid_parameter and y.UID_Person > ' ' join LDAPAccountInLDAPGroup z on y.uid_LDAPAccount = z.uid_LDAPAccount and z.XOrigin > 0 and z.XIsInEffect = 1 16 join LDAPGroup q on q.uid_LDAPGroup = z.uid_LDAPGroup where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 if @IncludeTSBPersonUsesAccount17 = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, q.XObjectKey18, @QER_BitPattern_Inherit_0 from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter join LDAPAccount a on y.ObjectKeyAccount19 = a.XObjectKey join LDAPAccountInLDAPGroup z on a.uid_LDAPAccount = z.uid_LDAPAccount and z.XOrigin > 0 and z.XIsInEffect = 1 join LDAPGroup q on q.uid_LDAPGroup20 = z.uid_LDAPGroup where z.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay = 0 end insert into @SourceData( IsUpcommingContent, XOriginBefore21 , Element, AssignedElement, XOriginAfter ) select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey22 from @SourceData ho join LDAPGroup g on ho.AssignedElement = g.XObjectKey join LDAPGroupCollection co on co.UID_LDAPGroupChild = g.uid_LDAPGroup join23 LDAPGroup p on co.UID_LDAPGroupParent = p.UID_LDAPGroup where ho.IsUpcommingContent = 1 and co.UID_LDAPGroupChild <> co.UID_LDAPGroupParent ) as t 24 insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , m.uid_person, pho.objectkey,25 @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_Person26 join PersonHasObject pho on pho.uid_person = s.uid_person where pho.ObjectKey like '<Key><T>LDAPAccount</T>%' or pho.ObjectKey like '<Key><T>LDAPGroup</T>%'27 if @IncludeTSBPersonUsesAccount = '1' begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select28 1, 0 , m.uid_person, pho.ObjectKey, @QER_BitPatternInherit_Master from TSBPersonUsesAccount y join @DBQueueCurrent x on y.uid_person = x.uid_parameter29 join person m on m.UID_Person = y.uid_person join person s on s.UID_PersonMasterIdentity = m.uid_Person join PersonHasObject pho on pho.uid_person = s.uid_person30 where pho.ObjectKey like '<Key><T>LDAPAccount</T>%' or pho.ObjectKey like '<Key><T>LDAPGroup</T>%' end berechnen: exec QBM_PDBQueueCalculateDelta @SourceData31, @DeltaQuantity = 1, @DeltaDelete = 1, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin32 output , @UseIsInEffect = 0 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent exec QER_PPersonHasObjectPostProc @SlotNumber , @CountDeltaOrigin33 , @CountDeltaQantity , 'LDP-K-PersonHasObject' END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel:34 end 35