Back to OIM Explorer

dbo.QBM_ZTableStatistics

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. References QBM_PJobCreate*

Source: sandbox-db sys.sql_modules

Source size: 1.123 characters

Interpretation

  • Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
  • Object-layer bridge detected through QBM_PJobCreate helper usage.

Relations

  • References QBM_PJobCreate*

Typed Edges

  • references source dbo.QBM_PJobCreate source text reference
  • references source dbo.QBM_PJobCreate_Mnt source text reference
  • references source dbo.QBM_PJournal source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_PTableStatistics source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL66 lines
1CREATE PROCEDURE QBM_ZTableStatistics(2  @Slotnumber int,3  @TableName varchar(38),4  @dummy1 varchar(38),5  @GenProcID varchar(38)6)7AS8BEGIN9  DECLARE @DebugSwitch int = 010  DECLARE @DebugMessage nvarchar(1000)11  DECLARE @DebugLevel char(1) = 'W'12  SET XACT_ABORT OFF13  BEGIN TRY14    IF @GenProcID IS NULL OR ISNULL(@TableName,15    '') NOT IN(16    SELECT t.TableName17    FROM DialogTable t18      WITH(readpast))19    BEGIN20      SELECT21        @DebugMessage = CONCAT(OBJECT_NAME(@@procid),22        ' empty values found ',23        ' GenProcID = ',24      CASE25        WHEN ISNULL(@GenProcID, '') = '' THEN26      ' <empty> '27      ELSE @GenProcID28      END,29      ' TableName = ',30      CASE31        WHEN ISNULL(@TableName, '') = '' THEN32      ' <empty> '33      ELSE @TableName34      END)35      EXEC QBM_PJournal @DebugMessage,36        @@procid,37      'D',38        @DebugLevel39      SELECT @GenProcID = NEWID()40    END41    IF 1=042    BEGIN43      EXEC QBM_PTableStatistics @TableName,44        @GenProcID45    END46    ELSE47    BEGIN48      DECLARE @SQL33734 nvarchar(max) = CONCAT('exec QBM_PTableStatistics ''',49      @TableName,50      ''', ''',51      @GenProcID,52      '''')53      EXEC QBM_PJobCreate_Mnt @SQL33734,54        @GenProcID55    END56  END TRY57  BEGIN CATCH58    EXEC QBM_PSessionErrorAdd DEFAULT59    RAISERROR('',60    18,61    1)62      WITH NOWAIT63  END CATCH64  ende:65  RETURN66END
Open raw exported source
SQL ยท Raw9 lines
1create   procedure QBM_ZTableStatistics ( @Slotnumber int , @TableName varchar(38) , @dummy1 varchar(38) , @GenProcID varchar(38) ) as begin declare2 @DebugSwitch int = 0 declare @DebugMessage nvarchar (1000) declare @DebugLevel char(1) = 'W' SET XACT_ABORT OFF BEGIN TRY if @GenProcID is null or ISNULL3(@TableName, '') not in (select t.TableName from DialogTable t with (readpast)) begin select @DebugMessage = CONCAT( OBJECT_NAME(@@procid) , ' empty values found '4 , ' GenProcID = ' , case when ISNULL(@GenProcID, '') = '' then ' <empty> ' else @GenProcID end , ' TableName = ' , case when ISNULL(@TableName, '') = 5'' then ' <empty> ' else @TableName end ) exec QBM_PJournal @DebugMessage, @@procid, 'D', @DebugLevel select @GenProcID = NEWID() end if 1=0 begin exec6 QBM_PTableStatistics @TableName, @GenProcID end else begin declare @SQL33734 nvarchar(max) = concat('exec QBM_PTableStatistics ''', @TableName, ''', '''7, @GenProcID, '''' ) exec QBM_PJobCreate_Mnt @SQL33734, @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH8 NOWAIT END CATCH  ende: return end 9