Back to OIM Explorer

dbo.QBM_PDBQueueInsert_WaitForComp

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. Single DBQueue insert -> at line 3; References QBM_PDBQueueInsert_Single

Source: sandbox-db sys.sql_modules

Source size: 669 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.

Verified Wait-For-Compiler DBQueue Helper Notes

  • Source catalog entry dbo.QBM_PDBQueueInsert_WaitForComp is a non-generated SQL stored procedure from sandbox-db sys.sql_modules.
  • The procedure sets local @UID_Task to QBM-K-CommonWaitForCompiler.
  • The source checks DialogDatabase for the main database with UID_CutOffTask is null before enqueueing.
  • When the condition matches, the source calls QBM_PDBQueueInsert_Single @UID_Task, '', '', @GenProcID.
  • Generated source-index flags show HasDBQueueInsertSingle=1, HasDBQueueInsertBulk=0, HasChangeLimit=0, and HasQbmPJobCreate=0.

Operational meaning: This helper gates insertion of the common wait-for-compiler DBQueue task. It is useful when tracing compiler wait/cutoff behavior because it only enqueues if the main database has no cutoff task set.

Relations

  • Single DBQueue insert -> at line 3
  • References QBM_PDBQueueInsert_Single

Typed Edges

  • queues DBQueue task at line 3 Single DBQueue insert -> at line 3
  • references source dbo.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.QBM_PDBQueueInsert_Single source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

Complete Source

SQL35 lines
1CREATE PROCEDURE QBM_PDBQueueInsert_WaitForComp(2  @Context varchar(38),3  @GenProcID varchar(38)4)5AS6BEGIN7  DECLARE @UID_Task varchar(38) = 'QBM-K-CommonWaitForCompiler'8  DECLARE @Message nvarchar(2000)9  DECLARE @DebugSwitch int = 010  DECLARE @DebugLevel char(1) = 'W'11  SET XACT_ABORT OFF12  BEGIN TRY13    IF EXISTS(14      SELECT TOP 1 115      FROM DialogDatabase d16      WHERE17        d.IsMainDatabase = 1 AND UID_CutOffTask IS NULL)18    BEGIN19      EXEC QBM_PDBQueueInsert_Single @UID_Task,20      '',21      '',22        @GenProcID23    END24  END TRY25  BEGIN CATCH26    EXEC QBM_PSessionErrorAdd DEFAULT27    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()28    RAISERROR(@Rethrow,29    18,30    1)31      WITH NOWAIT32  END CATCH33  ende:34  RETURN35END
Open raw exported source
SQL ยท Raw6 lines
1   create   procedure QBM_PDBQueueInsert_WaitForComp (@Context varchar(38) , @GenProcID varchar(38) ) as begin declare @UID_Task varchar(38) = 'QBM-K-CommonWaitForCompiler'2 declare @Message nvarchar(2000) declare @DebugSwitch int = 0 declare @DebugLevel char(1) = 'W' SET XACT_ABORT OFF BEGIN TRY if exists (select top 1 1 3from DialogDatabase d where d.IsMainDatabase = 1 and UID_CutOffTask is null ) begin exec QBM_PDBQueueInsert_Single @UID_Task, '', '', @GenProcID end END4 TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT5 END CATCH ende: return end 6