dbo.QER_PAfterMigrationTasks
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:07.653 · modified 2026-04-14T23:20:40.500 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@GenProcID | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| AccProduct | OBJECT_OR_COLUMN | ||
| accproductgroup | OBJECT_OR_COLUMN | ||
| AccProductGroupCollection | OBJECT_OR_COLUMN | ||
| BaseTree | OBJECT_OR_COLUMN | ||
| BaseTreeHasESet | OBJECT_OR_COLUMN | ||
| BaseTreeHasPWODecisionMethod | OBJECT_OR_COLUMN | ||
| BaseTreeHasQERAssign | OBJECT_OR_COLUMN | ||
| BaseTreeHasQERResource | OBJECT_OR_COLUMN | ||
| BaseTreeHasQERReuse | OBJECT_OR_COLUMN | ||
| BaseTreeHasQERReuseUS | OBJECT_OR_COLUMN | ||
| OrgRoot | OBJECT_OR_COLUMN | ||
| PWODecisionSubMethod | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Single | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBMModuleDef | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVGUIDToModuleOwner | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIDBOwner | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | 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 QER_PAfterMigrationTasks (@GenProcID varchar(38) ) as begin declare @MyModule varchar(3) = 'QER' declare @XUser nvarchar(64) 2 = object_name(@@procid) declare @Xdate datetime = getutcdate() SET XACT_ABORT OFF BEGIN TRY declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 3 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_OrgRoot as UID_Element from OrgRoot y where y.UID_OrgRoot like 4 '___-%' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgROOT', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 5 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree y where y.XUserUpdated like 6 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgTreeLEVEL', @DBQueueElements_02 7 exec QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeCollectionF', @DBQueueElements_02 declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 8 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree y where y.ITShopInfo = 'BO' 9 and y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select hm.UID_Org from BaseTreeHasPWODecisionMethod 10 hm where hm.UID_Org like '___-%' and hm.XUserUpdated like 'QBM_PBufferT_Process%' and hm.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk 11 'QER-K-ShoppingRackMethod', @DBQueueElements_03 declare @DBQueueElements_04 QBM_YDBQueueRaw insert into @DBQueueElements_04 (object, subobject, genprocid 12) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree y where y.ITShopInfo = 'PR' and y.XUserUpdated like 'QBM_PBufferT_Process%' 13 and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select y.UID_Org as UID_Element from BaseTree y join AccProduct p on y.UID_AccProduct 14 = p.UID_AccProduct where y.ITShopInfo = 'PR' and y.UID_Org like '___-%' and p.XUserUpdated like 'QBM_PBufferT_Process%' and p.XDateUpdated > GETUTCDATE 15() -1 union select y.UID_Org as UID_Element from BaseTree y where y.ITShopInfo = 'PR' and ( exists (select top 1 1 from accproduct a join accproductgroup 16 ch on a.UID_AccProductGroup = ch.UID_AccProductGroup join AccProductGroupCollection coll on ch.UID_AccProductGroup = coll.UID_AccProductGroupChild join 17 AccProductgroup pa on pa.UID_AccProductGroup = coll.UID_AccProductGroupParent where a.UID_AccProduct = y.UID_AccProduct and pa.XUserUpdated like 'QBM_PBufferT_Process%' 18 and pa.XDateUpdated > GETUTCDATE() -1 ) or exists (select top 1 1 from accproduct a join accproductgroup pa on a.UID_AccProductGroup = pa.UID_AccProductGroup 19 join AccProductGroupCollection coll on pa.UID_AccProductGroup = coll.UID_AccProductGroupParent join AccProductgroup ch on ch.UID_AccProductGroup = coll.UID_AccProductGroupChild 20 where a.UID_AccProduct = y.UID_AccProduct and ch.XUserUpdated like 'QBM_PBufferT_Process%' and ch.XDateUpdated > GETUTCDATE() -1 ) ) ) as x exec QBM_PDBQueueInsert_Bulk 21 'QER-K-ShoppingRackProductNode', @DBQueueElements_04 declare @DBQueueElements_05 QBM_YDBQueueRaw insert into @DBQueueElements_05 (object, subobject, 22genprocid) select x.uid, x.subobject, @GenProcID from ( select y.UID_Org as uid , 'QER-K-AllForOneOrg' as subobject from BaseTree y where y.UID_Org like 23 '___-%' and y.XUserUpdated like 'QBM_PBufferT_Process%' and y.XDateUpdated > GETUTCDATE() -1 union select y.UID_Org as uid , 'QER-K-AllForOneOrg' as 24subobject from BaseTreeHasESet y where y.UID_Org like '___-%' and y.XUserUpdated like 'QBM_PBufferT_Process%' and y.XDateUpdated > GETUTCDATE() -1 ) as 25 x exec QBM_PDBQueueInsert_Bulk 'QER-K-AllChildrenOfOrg', @DBQueueElements_05 update PWODecisionSubMethod set RevisionNumber = isnull(s.RevisionNumber 26, 0) + 1 , XDateUpdated = @Xdate , XUserUpdated = @XUser from PWODecisionSubMethod s where dbo.QBM_FCVGUIDToModuleOwner(s.UID_PWODecisionSubMethod) != 27 'CCC' declare @DBQueueElements_06 QBM_YDBQueueRaw insert into @DBQueueElements_06 (object, subobject, genprocid) select x.uid, null, @GenProcID from 28( select y.UID_AccProductGroup as uid from AccProductGroup y where y.UID_AccProductGroup like '___-%' and y.XUserUpdated like 'QBM_PBufferT_Process%' 29and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-AccProductGroupCollection', @DBQueueElements_06 if not exists (select 30top 1 1 from AccProductGroupCollection ) begin exec QBM_PDBQueueInsert_Single 'QBM-k-CommonRecalculate', 'QER-K-AccProductGroupCollection', '', @GenProcID 31 end if exists (select top 1 1 from QBMModuleDef d where d.ModuleName = @MyModule and d.CheckSumForDelta = 0 ) begin declare @DBQueueElements_07 QBM_YDBQueueRaw 32 insert into @DBQueueElements_07 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree 33 y where y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select y.UID_Org as UID_Element 34 from BaseTreeHasESet y where y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select 35 y.UID_Org as UID_Element from BaseTreeHasQERAssign y where y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > 36 GETUTCDATE() -1 union select y.UID_Org as UID_Element from BaseTreeHasQERResource y where y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like 37 '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select y.UID_Org as UID_Element from BaseTreeHasQERReuse y where y.XUserUpdated like 'QBM_PBufferT_Process%' 38 and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select y.UID_Org as UID_Element from BaseTreeHasQERReuseUS y where y.XUserUpdated 39 like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeHasObject' 40, @DBQueueElements_07 end else begin if dbo.QBM_FGIDBOwner() not in ( @MyModule ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'QER-K-BaseTreeHasObject' 41, '', @GenProcID exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'QER-K-PersonHasObject', '', @GenProcID end end exec QBM_PDBQueueInsert_Single 42 'QER-K-DynamicGroupMakeTrigger', '', '', @GenProcID END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow 43() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: return end 44
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:40.500
inserts DBQueue tasks has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PDBQueueInsert_Single, QBM_PSessionErrorAdd; writes INSERT into, UPDATE PWODecisionSubMethod; reads/joins OrgRoot, BaseTree, BaseTreeHasPWODecisionMethod, AccProduct, accproduct…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@GenProcID | varchar(38) | input |
DML targets
INSERT into UPDATE PWODecisionSubMethodRead/join references
SQL dependency metadata
- AccProduct
- accproductgroup
- AccProductGroupCollection
- BaseTree
- BaseTreeHasESet
- BaseTreeHasPWODecisionMethod
- BaseTreeHasQERAssign
- BaseTreeHasQERResource
- BaseTreeHasQERReuse
- BaseTreeHasQERReuseUS
- OrgRoot
- PWODecisionSubMethod
- QBM_PDBQueueInsert_Bulk
- QBM_PDBQueueInsert_Single
- QBM_PSessionErrorAdd
- QBM_YDBQueueRaw
- QBMModuleDef
- dbo.QBM_FCVGUIDToModuleOwner
- dbo.QBM_FGIDBOwner
- dbo.QBM_FGISessionErrorRethrow
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
QER-K-OrgROOT QER-K-OrgTreeLEVEL QER-K-BaseTreeCollectionF QER-K-ShoppingRackMethod QER-K-ShoppingRackProductNode QER-K-AllForOneOrg QER-K-AllChildrenOfOrg QER-K-AccProductGroupCollection QBM-k-CommonRecalculate QER-K-BaseTreeHasObject QBM-K-CommonReCalculate QER-K-PersonHasObject QER-K-DynamicGroupMakeTriggerTemp tables / referenced variables
Temp: None extracted.
Variables: @GenProcID @MyModule @XUser @procid @Xdate @DBQueueElements_01 @DBQueueElements_02 @DBQueueElements_03 @DBQueueElements_04 @DBQueueElements_05 @DBQueueElements_06 @DBQueueElements_07 @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.
No reverse dependencies extracted.