Back to OIM Explorer

dbo.ADS_PAfterMigrationTasks

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. Bulk DBQueue insert -> ADS-K-BaseTreeOwnsObject / ADS_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

Source: sandbox-db sys.sql_modules

Source size: 985 characters

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 -> ADS-K-BaseTreeOwnsObject / ADS_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 ADS_ZBaseTreeOwnsObject at line 4 Bulk DBQueue insert -> ADS-K-BaseTreeOwnsObject / ADS_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_FGISessionErrorRethrow 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 ADS-K-BaseTreeOwnsObject -> ADS_ZBaseTreeOwnsObject QBM_PDBQueueInsert_Bulk 'ADS-K-BaseTreeOwnsObject', @DBQueueElements_01 end else begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'ADS-K-BaseTreeOwnsObject', '', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd d…
  • queues DBQueue task QBM-K-CommonReCalculate -> QBM_ZRecalculate QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'ADS-K-BaseTreeOwnsObject', '', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow…

Complete Source

SQL49 lines
1CREATE PROCEDURE ADS_PAfterMigrationTasks(2  @GenProcID varchar(38)3)4AS5BEGIN6  DECLARE @MyModule varchar(3) = 'ADS'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.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.UID_Org LIKE '___-%' AND y.XDateUpdated > GETUTCDATE() -1) AS x28      EXEC QBM_PDBQueueInsert_Bulk 'ADS-K-BaseTreeOwnsObject',29        @DBQueueElements_0130    END31    ELSE32    BEGIN33      EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',34      'ADS-K-BaseTreeOwnsObject',35      '',36        @GenProcID37    END38  END TRY39  BEGIN CATCH40    EXEC QBM_PSessionErrorAdd DEFAULT41    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()42    RAISERROR(@Rethrow,43    18,44    1)45      WITH NOWAIT46  END CATCH47  endLabel:48  RETURN49END
Open raw exported source
SQL · Raw8 lines
1 create   procedure ADS_PAfterMigrationTasks (@GenProcID varchar(38) ) as begin declare @MyModule varchar(3) = 'ADS' 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_01 QBM_YDBQueueRaw3 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_Org as UID_Element from BaseTree4 y where y.XUserUpdated like 'QBM_PBufferT_Process%' and y.UID_Org like '___-%'  and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk5 'ADS-K-BaseTreeOwnsObject', @DBQueueElements_01 end else begin  exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'ADS-K-BaseTreeOwnsObject', 6'', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow7, 18, 1) WITH NOWAIT END CATCH endLabel: return end 8