Back to OIM Explorer

dbo.QBM_PDBQueueActivityDisable

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 877 characters

Interpretation

  • Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.

Relations

  • No extracted relations.

Typed Edges

  • references source dbo.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.QBM_PSessionContextSet source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_PSessionErrorClean source text reference

Complete Source

SQL40 lines
1CREATE PROCEDURE QBM_PDBQueueActivityDisable2AS3BEGIN4  DECLARE @SQLLockIgnore nvarchar(max)5  DECLARE @XUser nvarchar(64) = object_name(@@procid)6  DECLARE @Xdate datetime = getutcdate()7  SET XACT_ABORT OFF8  BEGIN TRY9    IF EXISTS(10      SELECT TOP 1 111      FROM sys.tables t12      WHERE13        t.name = 'DialogDatabase')14    BEGIN15      UPDATE DialogDatabase16      SET IsDBSchedulerDisabled = 1,17      XDateUpdated = @Xdate,18      XUserUpdated = @XUser19      WHERE20        IsMainDatabase = 1 AND IsDBSchedulerDisabled = 021    END22    UPDATE DialogDatabase23    SET UID_CutOffTask = NULL24    WHERE25      UID_CutOffTask = 'QBM-K-CommonWaitForCompiler'26    EXEC QBM_PSessionContextSet 'INSERTEDINTODBQUEUE',27    '1'28    EXEC QBM_PSessionErrorClean29  END TRY30  BEGIN CATCH31    EXEC QBM_PSessionErrorAdd DEFAULT32    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()33    RAISERROR(@Rethrow,34    18,35    1)36      WITH NOWAIT37  END CATCH38  endLabel:39  RETURN40END
Open raw exported source
SQL ยท Raw7 lines
1    create   procedure QBM_PDBQueueActivityDisable as begin declare @SQLLockIgnore nvarchar(max) declare @XUser nvarchar(64) = object_name(@@procid2) declare @Xdate datetime = getutcdate() SET XACT_ABORT OFF BEGIN TRY if exists (select top 1 1 from sys.tables t where t.name = 'DialogDatabase' ) begin3 update DialogDatabase set IsDBSchedulerDisabled = 1 , XDateUpdated = @Xdate , XUserUpdated = @XUser where IsMainDatabase = 1 and IsDBSchedulerDisabled4 = 0 end    update DialogDatabase set UID_CutOffTask = null where UID_CutOffTask = 'QBM-K-CommonWaitForCompiler' exec QBM_PSessionContextSet 'INSERTEDINTODBQUEUE'5, '1'                            exec QBM_PSessionErrorClean END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow6() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: return end 7