Back to OIM Explorer

dbo.QER_PITShopHelperFill_Recalc

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. single DBQueue insert -> QER-K-ShoppingRackPWOHelperPWO-Rec / QER_ZITShopHelperFill_Recalc at line 5; single DBQueue insert -> ATT-K-AttestationHelper-Rec / ATT_ZAttHelperFill_Recalc at line 5; single DBQueue insert -> ATT-K-AttestationHelper-Rec / ATT_ZAttHelperFill_Recalc at line 6; References QBM_PDBQueueInsert_Single

Source: sandbox-db sys.sql_modules

Source size: 1.115 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

  • single DBQueue insert -> QER-K-ShoppingRackPWOHelperPWO-Rec / QER_ZITShopHelperFill_Recalc at line 5
  • single DBQueue insert -> ATT-K-AttestationHelper-Rec / ATT_ZAttHelperFill_Recalc at line 5
  • single DBQueue insert -> ATT-K-AttestationHelper-Rec / ATT_ZAttHelperFill_Recalc at line 6
  • References QBM_PDBQueueInsert_Single

Typed Edges

  • queues DBQueue task QER_ZITShopHelperFill_Recalc at line 5 single DBQueue insert -> QER-K-ShoppingRackPWOHelperPWO-Rec / QER_ZITShopHelperFill_Recalc at line 5
  • queues DBQueue task ATT_ZAttHelperFill_Recalc at line 5 single DBQueue insert -> ATT-K-AttestationHelper-Rec / ATT_ZAttHelperFill_Recalc at line 5
  • queues DBQueue task ATT_ZAttHelperFill_Recalc at line 6 single DBQueue insert -> ATT-K-AttestationHelper-Rec / ATT_ZAttHelperFill_Recalc at line 6
  • references source dbo.QBM_PDBQueueInsert_Single source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QER_PITShopHelperFill source text reference
  • queues DBQueue task QER-K-ShoppingRackPWOHelperPWO-Rec -> QER_ZITShopHelperFill_Recalc QBM_PDBQueueInsert_single 'QER-K-ShoppingRackPWOHelperPWO-Rec', null, null, @GenProcID end if exists (select top 1 1 from @Parameter where Ident1 = 'A') begin exec QBM_PDBQueueInsert_single 'ATT-K-AttestationHelper-Rec', null, null, @GenPr…
  • queues DBQueue task ATT-K-AttestationHelper-Rec -> ATT_ZAttHelperFill_Recalc QBM_PDBQueueInsert_single 'ATT-K-AttestationHelper-Rec', null, null, @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end

Complete Source

SQL67 lines
1CREATE PROCEDURE QER_PITShopHelperFill_Recalc(2  @Parameter QBM_YCursorBuffer READONLY,3  @GenProcID varchar(38) = NULL4)5AS6BEGIN7  SET XACT_ABORT OFF8  BEGIN TRY9    IF isnull(@GenProcID,10    '') = ''11    BEGIN12      SELECT @GenProcID = NEWID()13    END14    INSERT INTO QERBufferRecalcDecisionMaker(UID_PWODecisionRule,15    ObjectKey,16    UsageArea,17    ProcessState,18    GenProcID)19    SELECT20      DISTINCT p.UID1,21      p.ObjectKey1,22      p.Ident1,23      0,24      @GenProcID25    FROM @Parameter p26    JOIN PWODecisionRule r27      ON p.UID1 = r.UID_PWODecisionRule28    WHERE29      NOT EXISTS(30    SELECT TOP 1 131    FROM QERBufferRecalcDecisionMaker m32      WITH(readpast)33    WHERE34      m.UID_PWODecisionRule = p.UID1 AND m.ObjectKey = p.ObjectKey1 AND m.ProcessState = 0)35    IF EXISTS(36      SELECT TOP 1 137      FROM @Parameter38      WHERE39        Ident1 = 'I')40    BEGIN41      EXEC QBM_PDBQueueInsert_single 'QER-K-ShoppingRackPWOHelperPWO-Rec',42      NULL,43      NULL,44        @GenProcID45    END46    IF EXISTS(47      SELECT TOP 1 148      FROM @Parameter49      WHERE50        Ident1 = 'A')51    BEGIN52      EXEC QBM_PDBQueueInsert_single 'ATT-K-AttestationHelper-Rec',53      NULL,54      NULL,55        @GenProcID56    END57  END TRY58  BEGIN CATCH59    EXEC QBM_PSessionErrorAdd DEFAULT60    RAISERROR('',61    18,62    1)63      WITH NOWAIT64  END CATCH65  endLabel:66  RETURN67END
Open raw exported source
SQL · Raw9 lines
1  create   procedure QER_PITShopHelperFill_Recalc (@Parameter QBM_YCursorBuffer readonly , @GenProcID varchar(38) = null ) as begin SET XACT_ABORT2 OFF BEGIN TRY if isnull(@GenProcID, '') = '' begin select @GenProcID = NEWID() end   insert into QERBufferRecalcDecisionMaker (UID_PWODecisionRule, ObjectKey3, UsageArea, ProcessState, GenProcID) select distinct p.UID1, p.ObjectKey1, p.Ident1, 0, @GenProcID from @Parameter p join PWODecisionRule r on p.UID1 4= r.UID_PWODecisionRule where not exists ( select top 1 1 from QERBufferRecalcDecisionMaker m with (readpast) where m.UID_PWODecisionRule = p.UID1 and 5m.ObjectKey = p.ObjectKey1 and m.ProcessState = 0 ) if exists (select top 1 1 from @Parameter where Ident1 = 'I') begin exec QBM_PDBQueueInsert_single 6'QER-K-ShoppingRackPWOHelperPWO-Rec', null, null, @GenProcID end if exists (select top 1 1 from @Parameter where Ident1 = 'A')  begin exec QBM_PDBQueueInsert_single7 'ATT-K-AttestationHelper-Rec', null, null, @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END 8CATCH endLabel: return end 9