dbo.TSB_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 -> TSB-K-BaseTreeOwnsObject / TSB_ZBaseTreeOwnsObject at line 4
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 4
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 5
- References QBM_PDBQueueInsert_Single
- References QBM_PDBQueueInsert_Bulk
Typed Edges
- queues DBQueue task TSB_ZBaseTreeOwnsObject at line 4 Bulk DBQueue insert -> TSB-K-BaseTreeOwnsObject / TSB_ZBaseTreeOwnsObject 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 QBM_ZRecalculate at line 5 Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 5
- references source dbo.QBM_FGIDBOwner source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- queues DBQueue task TSB-K-BaseTreeOwnsObject -> TSB_ZBaseTreeOwnsObject QBM_PDBQueueInsert_Bulk 'TSB-K-BaseTreeOwnsObject', @DBQueueElements_01 end else begin if dbo.QBM_FGIDBOwner() not in ( @MyModule ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate' , 'TSB-K-BaseTreeOwnsObject', '', @GenProcID…
- queues DBQueue task QBM-K-CommonReCalculate -> QBM_ZRecalculate QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate' , 'TSB-K-BaseTreeOwnsObject', '', @GenProcID end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end
References
- dbo.QBM_FGIDBOwner
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE TSB_PAfterMigrationTasks(2 @GenProcID varchar(38)3)4AS5BEGIN6 DECLARE @MyModule varchar(3) = 'TSB'7 SET XACT_ABORT OFF8 BEGIN TRY9 IF EXISTS(10 SELECT TOP 1 111 FROM QBMModuleDef d12 WHERE13 d.ModuleName = @MyModule AND d.CheckSumForDelta = 0)14 BEGIN15 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw16 INSERT INTO @DBQueueElements_01(object,17 subobject,18 genprocid)19 SELECT20 x.UID_Element,21 NULL,22 @GenProcID23 FROM(24 SELECT y.UID_Org AS UID_Element25 FROM BaseTree y26 WHERE27 y.UID_Org LIKE '___-%' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.XDateUpdated > GETUTCDATE() -1) AS x28 EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-BaseTreeOwnsObject',29 @DBQueueElements_0130 END31 ELSE32 BEGIN33 IF dbo.QBM_FGIDBOwner() NOT IN(@MyModule)34 BEGIN35 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',36 'TSB-K-BaseTreeOwnsObject',37 '',38 @GenProcID39 END40 END41 END TRY42 BEGIN CATCH43 EXEC QBM_PSessionErrorAdd DEFAULT44 RAISERROR('',45 18,46 1)47 WITH NOWAIT48 END CATCH49 endLabel:50 RETURN51END
Open raw exported source
1 create procedure TSB_PAfterMigrationTasks (@GenProcID varchar(38) ) as begin declare @MyModule varchar(3) = 'TSB' SET XACT_ABORT OFF BEGIN TRY2 if exists (select top 1 1 from QBMModuleDef d where d.ModuleName = @MyModule and d.CheckSumForDelta = 0 ) begin declare @DBQueueElements_013 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element4 from BaseTree y where y.UID_Org like '___-%' and y.XUserUpdated like 'QBM_PBufferT_Process%' and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk5 'TSB-K-BaseTreeOwnsObject', @DBQueueElements_01 end else begin if dbo.QBM_FGIDBOwner() not in ( @MyModule ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate'6, 'TSB-K-BaseTreeOwnsObject', '', @GenProcID end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH7 endLabel: return end 8