Back to OIM Explorer

dbo.CPL_PAfterMigrationTasks

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. Bulk DBQueue insert -> CPL-K-ComplianceSubRuleFillPerson / CPL_ZSubRuleFillPerson at line 6; Bulk DBQueue insert -> CPL-K-ComplianceCheckForRule / CPL_ZComplianceCheckForRule at line 6; Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 6; Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 6

Source: sandbox-db sys.sql_modules

Source size: 1.610 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 -> CPL-K-ComplianceSubRuleFillPerson / CPL_ZSubRuleFillPerson at line 6
  • Bulk DBQueue insert -> CPL-K-ComplianceCheckForRule / CPL_ZComplianceCheckForRule at line 6
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 6
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 6
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 6
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 8
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 8
  • Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 9
  • References QBM_PDBQueueInsert_Single
  • References QBM_PDBQueueInsert_Bulk

Typed Edges

  • queues DBQueue task CPL_ZSubRuleFillPerson at line 6 Bulk DBQueue insert -> CPL-K-ComplianceSubRuleFillPerson / CPL_ZSubRuleFillPerson at line 6
  • queues DBQueue task CPL_ZComplianceCheckForRule at line 6 Bulk DBQueue insert -> CPL-K-ComplianceCheckForRule / CPL_ZComplianceCheckForRule 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 QBM_ZRecalculate at line 7 Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
  • queues DBQueue task QBM_ZRecalculate at line 8 Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 8
  • queues DBQueue task QBM_ZRecalculate at line 9 Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 9
  • references source dbo.QBM_FGIDBOwner source text reference
  • 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 CPL-K-ComplianceSubRuleFillPerson -> CPL_ZSubRuleFillPerson QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceSubRuleFillPerson', @DBQueueElements_02 exec QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceCheckForRule', @DBQueueElements_02 end else begin if dbo.QBM_FGIDBOwner() not in ( @MyModule ) begin exec QBM_PD…
  • queues DBQueue task CPL-K-ComplianceCheckForRule -> CPL_ZComplianceCheckForRule QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceCheckForRule', @DBQueueElements_02 end else begin if dbo.QBM_FGIDBOwner() not in ( @MyModule ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'CPL-K-ComplianceSubRuleFillObject', ''…
  • queues DBQueue task QBM-K-CommonReCalculate -> QBM_ZRecalculate QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'CPL-K-ComplianceSubRuleFillObject', '', @GenProcID exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'CPL-K-ComplianceSubRuleFillPerson' , '', @GenProcID exec QBM_PDBQueueInsert…

Complete Source

SQL67 lines
1CREATE PROCEDURE CPL_PAfterMigrationTasks(2  @GenProcID varchar(38)3)4AS5BEGIN6  DECLARE @MyModule varchar(3) = 'CPL'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_02 QBM_YDBQueueRaw16      INSERT INTO @DBQueueElements_02(object,17      subobject,18      genprocid)19      SELECT20        x.UID_Element,21        NULL,22        @GenProcID23      FROM(24      SELECT y.UID_ComplianceRule AS UID_Element25      FROM ComplianceRule y26      WHERE27        y.UID_ComplianceRule LIKE '___-%' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.XDateUpdated > GETUTCDATE() -128      UNION29      SELECT y.UID_ComplianceRule AS UID_Element30      FROM ComplianceSubRule y31      WHERE32        y.UID_ComplianceSubRule LIKE '___-%' AND y.XUserUpdated LIKE 'QBM_PBufferT_Process%' AND y.XDateUpdated > GETUTCDATE() -1) AS x33      EXEC QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceSubRuleFillPerson',34        @DBQueueElements_0235      EXEC QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceCheckForRule',36        @DBQueueElements_0237    END38    ELSE39    BEGIN40      IF dbo.QBM_FGIDBOwner() NOT IN(@MyModule)41      BEGIN42        EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',43        'CPL-K-ComplianceSubRuleFillObject',44        '',45          @GenProcID46        EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',47        'CPL-K-ComplianceSubRuleFillPerson',48        '',49          @GenProcID50        EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',51        'CPL-K-ComplianceCheckForRule',52        '',53          @GenProcID54      END55    END56  END TRY57  BEGIN CATCH58    EXEC QBM_PSessionErrorAdd DEFAULT59    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()60    RAISERROR(@Rethrow,61    18,62    1)63      WITH NOWAIT64  END CATCH65  endLabel:66  RETURN67END
Open raw exported source
SQL · Raw12 lines
1  create   procedure CPL_PAfterMigrationTasks (@GenProcID varchar(38) ) as begin declare @MyModule varchar(3) = 'CPL' 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_023 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.UID_Element, null, @GenProcID from ( select y.UID_ComplianceRule4 as UID_Element from ComplianceRule y where y.UID_ComplianceRule like '___-%'  and y.XUserUpdated like 'QBM_PBufferT_Process%' and y.XDateUpdated > GETUTCDATE5() -1 union select y.UID_ComplianceRule as UID_Element from ComplianceSubRule y where y.UID_ComplianceSubRule like '___-%'  and y.XUserUpdated like 'QBM_PBufferT_Process%'6 and y.XDateUpdated > GETUTCDATE() -1 ) as x exec QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceSubRuleFillPerson', @DBQueueElements_02 exec QBM_PDBQueueInsert_Bulk7 'CPL-K-ComplianceCheckForRule', @DBQueueElements_02 end else begin   if dbo.QBM_FGIDBOwner() not in ( @MyModule ) begin exec QBM_PDBQueueInsert_Single8 'QBM-K-CommonReCalculate', 'CPL-K-ComplianceSubRuleFillObject', '', @GenProcID exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'CPL-K-ComplianceSubRuleFillPerson'9, '', @GenProcID exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'CPL-K-ComplianceCheckForRule', '', @GenProcID end  end END TRY BEGIN CATCH 10exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel:11 return end 12