dbo.QER_PAfterMigrationTasks
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Bulk DBQueue insert -> QER-K-OrgROOT / QER_ZOrgRoot at line 4
- Bulk DBQueue insert -> QER-K-OrgTreeLEVEL / QER_ZOrgTreeLevel at line 4
- Bulk DBQueue insert -> QER-K-BaseTreeCollectionF / QER_ZBaseTreeCollectionF at line 4
- Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 4
- Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 4
- Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 4
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 4
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 4
- Bulk DBQueue insert -> QER-K-OrgTreeLEVEL / QER_ZOrgTreeLevel at line 6
- Bulk DBQueue insert -> QER-K-BaseTreeCollectionF / QER_ZBaseTreeCollectionF at line 6
- Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 6
- Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 6
- Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 6
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 6
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 6
- Bulk DBQueue insert -> QER-K-BaseTreeCollectionF / QER_ZBaseTreeCollectionF at line 7
- Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 7
- Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7
- Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 7
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 7
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 7
- Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 10
- Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 10
- Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 10
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 10
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 10
- Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 10
- Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 20
- Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 20
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 20
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 20
- Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 20
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 20
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 20
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 20
- Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 25
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 25
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 25
- Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 25
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 25
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 25
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 25
- Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 29
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 29
- Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 29
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 29
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 29
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 29
- Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 30
- Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 30
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 30
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 30
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 30
- Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 39
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 39
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 39
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 39
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 40
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 40
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 40
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 41
- Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 41
- References QBM_PDBQueueInsert_Single
- References QBM_PDBQueueInsert_Bulk
Typed Edges
- queues DBQueue task QER_ZOrgRoot at line 4 Bulk DBQueue insert -> QER-K-OrgROOT / QER_ZOrgRoot at line 4
- queues DBQueue task QER_ZOrgTreeLevel at line 4 Bulk DBQueue insert -> QER-K-OrgTreeLEVEL / QER_ZOrgTreeLevel at line 4
- queues DBQueue task QER_ZBaseTreeCollectionF at line 4 Bulk DBQueue insert -> QER-K-BaseTreeCollectionF / QER_ZBaseTreeCollectionF at line 4
- queues DBQueue task QER_ZITShopCheckMethodBO at line 4 Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 4
- queues DBQueue task QER_ZITShopCheckMethodPR at line 4 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 4
- queues DBQueue task QER_ZAllChildrenOfOrg at line 4 Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 4
- queues DBQueue task QER_ZAccProductGroupCollection at line 4 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 4
- queues DBQueue task QBM_ZRecalculate at line 4 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 4
- queues DBQueue task QER_ZOrgTreeLevel at line 6 Bulk DBQueue insert -> QER-K-OrgTreeLEVEL / QER_ZOrgTreeLevel at line 6
- queues DBQueue task QER_ZBaseTreeCollectionF at line 6 Bulk DBQueue insert -> QER-K-BaseTreeCollectionF / QER_ZBaseTreeCollectionF at line 6
- queues DBQueue task QER_ZITShopCheckMethodBO at line 6 Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 6
- queues DBQueue task QER_ZITShopCheckMethodPR at line 6 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 6
- queues DBQueue task QER_ZAllChildrenOfOrg at line 6 Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 6
- queues DBQueue task QER_ZAccProductGroupCollection at line 6 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 6
- queues DBQueue task QBM_ZRecalculate at line 6 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 6
- queues DBQueue task QER_ZBaseTreeCollectionF at line 7 Bulk DBQueue insert -> QER-K-BaseTreeCollectionF / QER_ZBaseTreeCollectionF at line 7
- queues DBQueue task QER_ZITShopCheckMethodBO at line 7 Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 7
- queues DBQueue task QER_ZITShopCheckMethodPR at line 7 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 7
- queues DBQueue task QER_ZAllChildrenOfOrg at line 7 Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 7
- queues DBQueue task QER_ZAccProductGroupCollection at line 7 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 7
- queues DBQueue task QBM_ZRecalculate at line 7 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 7
- queues DBQueue task QER_ZITShopCheckMethodBO at line 10 Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 10
- queues DBQueue task QER_ZITShopCheckMethodPR at line 10 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 10
- queues DBQueue task QER_ZAllChildrenOfOrg at line 10 Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 10
- queues DBQueue task QER_ZAccProductGroupCollection at line 10 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 10
- queues DBQueue task QBM_ZRecalculate at line 10 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 10
- queues DBQueue task QER_ZBaseTreeHasObject at line 10 Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 10
- queues DBQueue task QER_ZITShopCheckMethodPR at line 20 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 20
- queues DBQueue task QER_ZAllChildrenOfOrg at line 20 Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 20
- queues DBQueue task QER_ZAccProductGroupCollection at line 20 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 20
- queues DBQueue task QBM_ZRecalculate at line 20 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 20
- queues DBQueue task QER_ZBaseTreeHasObject at line 20 Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 20
- queues DBQueue task QER_ZDynamicGroupMakeTrigger at line 20 Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 20
- queues DBQueue task QER_ZAllChildrenOfOrg at line 25 Bulk DBQueue insert -> QER-K-AllChildrenOfOrg / QER_ZAllChildrenOfOrg at line 25
- queues DBQueue task QER_ZAccProductGroupCollection at line 25 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 25
- queues DBQueue task QBM_ZRecalculate at line 25 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 25
- queues DBQueue task QER_ZBaseTreeHasObject at line 25 Bulk DBQueue insert -> QER-K-BaseTreeHasObject / QER_ZBaseTreeHasObject at line 25
- queues DBQueue task QER_ZDynamicGroupMakeTrigger at line 25 Single DBQueue insert -> QER-K-DynamicGroupMakeTrigger / QER_ZDynamicGroupMakeTrigger at line 25
- queues DBQueue task QER_ZAccProductGroupCollection at line 29 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 29
- queues DBQueue task QBM_ZRecalculate at line 29 Single DBQueue insert -> QBM-k-CommonRecalculate / QBM_ZRecalculate at line 29
References
- dbo.QBM_FCVGUIDToModuleOwner
- dbo.QBM_FGIDBOwner
- dbo.QBM_FGISessionErrorRethrow
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QER_PAfterMigrationTasks(2 @GenProcID varchar(38)3)4AS5BEGIN6 DECLARE @MyModule varchar(3) = 'QER'7 DECLARE @XUser nvarchar(64) = object_name(@@procid)8 DECLARE @Xdate datetime = getutcdate()9 SET XACT_ABORT OFF10 BEGIN TRY11 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw12 INSERT INTO @DBQueueElements_01(object,13 subobject,14 genprocid)15 SELECT16 x.UID_Element,17 NULL,18 @GenProcID19 FROM(20 SELECT y.UID_OrgRoot AS UID_Element21 FROM OrgRoot y22 WHERE23 y.UID_OrgRoot LIKE '___-%') AS x24 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-OrgROOT',25 @DBQueueElements_0126 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw27 INSERT INTO @DBQueueElements_02(object,28 subobject,29 genprocid)30 SELECT31 x.UID_Element,32 NULL,33 @GenProcID34 FROM(35 SELECT y.UID_Org AS UID_Element36 FROM BaseTree y37 WHERE38 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1) AS x39 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-OrgTreeLEVEL',40 @DBQueueElements_0241 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeCollectionF',42 @DBQueueElements_0243 DECLARE @DBQueueElements_03 QBM_YDBQueueRaw44 INSERT INTO @DBQueueElements_03(object,45 subobject,46 genprocid)47 SELECT48 x.UID_Element,49 NULL,50 @GenProcID51 FROM(52 SELECT y.UID_Org AS UID_Element53 FROM BaseTree y54 WHERE55 y.ITShopInfo = 'BO' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -156 UNION57 SELECT hm.UID_Org58 FROM BaseTreeHasPWODecisionMethod hm59 WHERE60 hm.UID_Org LIKE '___-%' AND hm.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND hm.XDateUpdated > GETUTCDATE() -1) AS x61 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackMethod',62 @DBQueueElements_0363 DECLARE @DBQueueElements_04 QBM_YDBQueueRaw64 INSERT INTO @DBQueueElements_04(object,65 subobject,66 genprocid)67 SELECT68 x.UID_Element,69 NULL,70 @GenProcID71 FROM(72 SELECT y.UID_Org AS UID_Element73 FROM BaseTree y74 WHERE75 y.ITShopInfo = 'PR' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -176 UNION77 SELECT y.UID_Org AS UID_Element78 FROM BaseTree y79 JOIN AccProduct p80 ON y.UID_AccProduct = p.UID_AccProduct81 WHERE82 y.ITShopInfo = 'PR' AND y.UID_Org LIKE '___-%' AND p.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND p.XDateUpdated > GETUTCDATE() -183 UNION84 SELECT y.UID_Org AS UID_Element85 FROM BaseTree y86 WHERE87 y.ITShopInfo = 'PR' AND(EXISTS(88 SELECT TOP 1 189 FROM accproduct a90 JOIN accproductgroup ch91 ON a.UID_AccProductGroup = ch.UID_AccProductGroup92 JOIN AccProductGroupCollection coll93 ON ch.UID_AccProductGroup = coll.UID_AccProductGroupChild94 JOIN AccProductgroup pa95 ON pa.UID_AccProductGroup = coll.UID_AccProductGroupParent96 WHERE97 a.UID_AccProduct = y.UID_AccProduct AND pa.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND pa.XDateUpdated > GETUTCDATE() -1) OR EXISTS(98 SELECT TOP 1 199 FROM accproduct a100 JOIN accproductgroup pa101 ON a.UID_AccProductGroup = pa.UID_AccProductGroup102 JOIN AccProductGroupCollection coll103 ON pa.UID_AccProductGroup = coll.UID_AccProductGroupParent104 JOIN AccProductgroup ch105 ON ch.UID_AccProductGroup = coll.UID_AccProductGroupChild106 WHERE107 a.UID_AccProduct = y.UID_AccProduct AND ch.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND ch.XDateUpdated > GETUTCDATE() -1))) AS x108 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode',109 @DBQueueElements_04110 DECLARE @DBQueueElements_05 QBM_YDBQueueRaw111 INSERT INTO @DBQueueElements_05(object,112 subobject,113 genprocid)114 SELECT115 x.uid,116 x.subobject,117 @GenProcID118 FROM(119 SELECT120 y.UID_Org AS uid,121 'QER-K-AllForOneOrg' AS subobject122 FROM BaseTree y123 WHERE124 y.UID_Org LIKE '___-%' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.XDateUpdated > GETUTCDATE() -1125 UNION126 SELECT127 y.UID_Org AS uid,128 'QER-K-AllForOneOrg' AS subobject129 FROM BaseTreeHasESet y130 WHERE131 y.UID_Org LIKE '___-%' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.XDateUpdated > GETUTCDATE() -1) AS x132 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-AllChildrenOfOrg',133 @DBQueueElements_05134 UPDATE PWODecisionSubMethod135 SET RevisionNumber = isnull(s.RevisionNumber,136 0) + 1,137 XDateUpdated = @Xdate,138 XUserUpdated = @XUser139 FROM PWODecisionSubMethod s140 WHERE141 dbo.QBM_FCVGUIDToModuleOwner(s.UID_PWODecisionSubMethod) != 'CCC'142 DECLARE @DBQueueElements_06 QBM_YDBQueueRaw143 INSERT INTO @DBQueueElements_06(object,144 subobject,145 genprocid)146 SELECT147 x.uid,148 NULL,149 @GenProcID150 FROM(151 SELECT y.UID_AccProductGroup AS uid152 FROM AccProductGroup y153 WHERE154 y.UID_AccProductGroup LIKE '___-%' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.XDateUpdated > GETUTCDATE() -1) AS x155 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-AccProductGroupCollection',156 @DBQueueElements_06157 IF NOT EXISTS(158 SELECT TOP 1 1159 FROM AccProductGroupCollection)160 BEGIN161 EXEC QBM_PDBQueueInsert_Single 'QBM-k-CommonRecalculate',162 'QER-K-AccProductGroupCollection',163 '',164 @GenProcID165 END166 IF EXISTS(167 SELECT TOP 1 1168 FROM QBMModuleDef d169 WHERE170 d.ModuleName = @MyModule AND d.CheckSumForDelta = 0)171 BEGIN172 DECLARE @DBQueueElements_07 QBM_YDBQueueRaw173 INSERT INTO @DBQueueElements_07(object,174 subobject,175 genprocid)176 SELECT177 x.UID_Element,178 NULL,179 @GenProcID180 FROM(181 SELECT y.UID_Org AS UID_Element182 FROM BaseTree y183 WHERE184 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1185 UNION186 SELECT y.UID_Org AS UID_Element187 FROM BaseTreeHasESet y188 WHERE189 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1190 UNION191 SELECT y.UID_Org AS UID_Element192 FROM BaseTreeHasQERAssign y193 WHERE194 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1195 UNION196 SELECT y.UID_Org AS UID_Element197 FROM BaseTreeHasQERResource y198 WHERE199 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1200 UNION201 SELECT y.UID_Org AS UID_Element202 FROM BaseTreeHasQERReuse y203 WHERE204 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1205 UNION206 SELECT y.UID_Org AS UID_Element207 FROM BaseTreeHasQERReuseUS y208 WHERE209 y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1) AS x210 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeHasObject',211 @DBQueueElements_07212 END213 ELSE214 BEGIN215 IF dbo.QBM_FGIDBOwner() NOT IN(@MyModule)216 BEGIN217 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',218 'QER-K-BaseTreeHasObject',219 '',220 @GenProcID221 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',222 'QER-K-PersonHasObject',223 '',224 @GenProcID225 END226 END227 EXEC QBM_PDBQueueInsert_Single 'QER-K-DynamicGroupMakeTrigger',228 '',229 '',230 @GenProcID231 END TRY232 BEGIN CATCH233 EXEC QBM_PSessionErrorAdd DEFAULT234 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()235 RAISERROR(@Rethrow,236 18,237 1)238 WITH NOWAIT239 END CATCH240 endLabel:241 RETURN242END
Open raw exported source
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_013 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_OrgRoot as UID_Element from OrgRoot y where y.UID_OrgRoot like4 '___-%' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgROOT', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_025 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree y where y.XUserUpdated like6 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgTreeLEVEL', @DBQueueElements_027 exec QBM_PDBQueueInsert_Bulk 'QER-K-BaseTreeCollectionF', @DBQueueElements_02 declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_038 (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 BaseTreeHasPWODecisionMethod10 hm where hm.UID_Org like '___-%' and hm.XUserUpdated like 'QBM_PBufferT_Process%' and hm.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk11 'QER-K-ShoppingRackMethod', @DBQueueElements_03 declare @DBQueueElements_04 QBM_YDBQueueRaw insert into @DBQueueElements_04 (object, subobject, genprocid12) 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_AccProduct14 = p.UID_AccProduct where y.ITShopInfo = 'PR' and y.UID_Org like '___-%' and p.XUserUpdated like 'QBM_PBufferT_Process%' and p.XDateUpdated > GETUTCDATE15() -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 accproductgroup16 ch on a.UID_AccProductGroup = ch.UID_AccProductGroup join AccProductGroupCollection coll on ch.UID_AccProductGroup = coll.UID_AccProductGroupChild join17 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_AccProductGroup19 join AccProductGroupCollection coll on pa.UID_AccProductGroup = coll.UID_AccProductGroupParent join AccProductgroup ch on ch.UID_AccProductGroup = coll.UID_AccProductGroupChild20 where a.UID_AccProduct = y.UID_AccProduct and ch.XUserUpdated like 'QBM_PBufferT_Process%' and ch.XDateUpdated > GETUTCDATE() -1 ) ) ) as x exec QBM_PDBQueueInsert_Bulk21 '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 like23 '___-%' 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 ) as25 x exec QBM_PDBQueueInsert_Bulk 'QER-K-AllChildrenOfOrg', @DBQueueElements_05 update PWODecisionSubMethod set RevisionNumber = isnull(s.RevisionNumber26, 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', '', @GenProcID31 end if exists (select top 1 1 from QBMModuleDef d where d.ModuleName = @MyModule and d.CheckSumForDelta = 0 ) begin declare @DBQueueElements_07 QBM_YDBQueueRaw32 insert into @DBQueueElements_07 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree33 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_Element34 from BaseTreeHasESet y where y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%' and y.XDateUpdated > GETUTCDATE() -1 union select35 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 like37 '___-%' 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.XUserUpdated39 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_Single42 'QER-K-DynamicGroupMakeTrigger', '', '', @GenProcID END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow43() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: return end 44