dbo.QER_PPersonHasObjectPostProc

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberintno
@CountDeltaOriginintno
@CountDeltaQantityintno
@UID_TaskForMasterIdentityvarcharno

Referenced objects

SchemaObjectColumn/minorClass
personOBJECT_OR_COLUMN
PersonHasObjectOBJECT_OR_COLUMN
QBM_PDBQueueInsert_BulkOBJECT_OR_COLUMN
QBM_PSessionContextSetOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBM_YDBQueueRawTYPE
dboQBM_FCVElementToObjectKey1OBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_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 QER_PPersonHasObjectPostProc ( @SlotNumber int , @CountDeltaOrigin int , @CountDeltaQantity int , @UID_TaskForMasterIdentity
2 varchar(38) ) as begin declare @ElementCount int declare @ElementIndex int declare @ElementLast int declare @GenProcID varchar(38) declare @GenProcID_R
3 varchar(38) = dbo.QBM_FGISessionContext('') SET XACT_ABORT OFF BEGIN TRY if @CountDeltaOrigin > 0 begin declare @GenProcIDs_CountDeltaOrigin QBM_YCursorBuffer
4 insert into @GenProcIDs_CountDeltaOrigin (UID1) select distinct de.GenProcID from #QBMDeltaOrigin de select @ElementCount = @@ROWCOUNT select @ElementIndex
5 = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin select top 1 @GenProcID = bu.UID1 from @GenProcIDs_CountDeltaOrigin
6 bu where bu.ElementIndex = @ElementIndex exec QBM_PSessionContextSet 'GenProcID', @GenProcID update PersonHasObject set InheritInfo = di.XOrigin from 
7PersonHasObject bho join #QBMDeltaOrigin di on bho.uid_Person = di.Element and bho.Objectkey = di.AssignedElement where di.GenProcID = @GenProcID select
8 @ElementIndex += 1 end  end  if @CountDeltaQantity > 0 begin  update #QBMDeltaInsert set NewPK = newid() declare @GenProcIDs_CountDeltaQuantity QBM_YCursorBuffer
9 insert into @GenProcIDs_CountDeltaQuantity (UID1) select de.GenProcID from #QBMDeltaDelete de union select de.GenProcID from #QBMDeltaInsert de select
10 @ElementCount = @@ROWCOUNT select @ElementIndex = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin
11 select top 1 @GenProcID = bu.UID1 from @GenProcIDs_CountDeltaQuantity bu where bu.ElementIndex = @ElementIndex if exists (select top 1 1 from #QBMDeltaDelete
12 x where x.GenProcID = @GenProcID ) begin exec QBM_PSessionContextSet 'GenProcID', @GenProcID delete from PersonHasObject where exists (select top 1 1 
13from #QBMDeltaDelete d where d.Element = PersonHasObject.uid_person and d.AssignedElement = PersonHasObject.ObjectKey and d.GenProcID = @GenProcID ) end
14  if exists (select top 1 1 from #QBMDeltaInsert x where x.GenProcID = @GenProcID ) begin exec QBM_PSessionContextSet 'GenProcID', @GenProcID insert into
15 PersonHasObject (UID_PersonHasObject, UID_Person ,ObjectKey , XObjectKey, InheritInfo) select di.NewPK, di.Element, di.AssignedElement, dbo.QBM_FCVElementToObjectKey1
16('PersonHasObject', 'UID_PersonHasObject', di.NewPK), XOrigin from #QBMDeltaInsert di where di.GenProcID = @GenProcID and not exists (select top 1 1 from
17 PersonHasObject e where e.UID_Person = di.Element and e.ObjectKey = di.AssignedElement ) end  select @ElementIndex += 1 end  end  if @CountDeltaOrigin
18 + @CountDeltaQantity > 0 begin  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select y.uid
19, null, y.GenProcID from ( select distinct s.UID_PersonMasterIdentity as uid, x.GenProcID as GenProcID from ( select d.Element as uid, d.GenProcID from
20 #QBMDeltaQuantity d union select d.Element as uid, d.GenProcID from #QBMDeltaOrigin d ) as x join person s on s.uid_person = x.uid and s.UID_PersonMasterIdentity
21 > ' ' ) as y exec QBM_PDBQueueInsert_Bulk @UID_TaskForMasterIdentity, @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare
22 @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: exec QBM_PSessionContextSet 'GenProcID'
23, @GenProcID_R return end 
24

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:39.417

inserts DBQueue tasks uses session context values has TRY/CATCH error handling

Summary: calls QBM_PSessionContextSet, QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, INSERT PersonHasObject, UPDATE PersonHasObject, DELETE PersonHasObject; reads/joins PersonHasObject, person; uses session context GenProcID

Declared parameters

ParameterTypeDirection
@SlotNumberintinput
@CountDeltaOriginintinput
@CountDeltaQantityintinput
@UID_TaskForMasterIdentityvarchar(38)input

DML targets

INSERT into INSERT PersonHasObject UPDATE PersonHasObject DELETE PersonHasObject

Read/join references

Config/session

Config: None extracted.

Session: GenProcID

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #QBMDeltaOrigin #QBMDeltaInsert #QBMDeltaDelete #QBMDeltaQuantity

Variables: @SlotNumber @CountDeltaOrigin @CountDeltaQantity @UID_TaskForMasterIdentity @ElementCount @ElementIndex @ElementLast @GenProcID @GenProcID_R @GenProcIDs_CountDeltaOrigin @ROWCOUNT @IDENTITY @GenProcIDs_CountDeltaQuantity @DBQueueElements_01 @Rethrow

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.

Referencing objectRelationEvidence
dbo.ADS_ZPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.LDP_ZPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ZPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ZPersonHasObjectExtAttSQL expression dependencyOBJECT_OR_COLUMN
dbo.RMS_ZPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.RPS_ZPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.TSB_ZPersonHasObjectSQL expression dependencyOBJECT_OR_COLUMN
dbo.ADS_ZPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.LDP_ZPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.QER_ZPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.QER_ZPersonHasObjectExtAttsource text referencehas TRY/CATCH error handling
dbo.RMS_ZPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.RPS_ZPersonHasObjectsource text referencehas TRY/CATCH error handling
dbo.TSB_ZPersonHasObjectsource text referencehas TRY/CATCH error handling