Back to OIM Explorer

dbo.QBM_PIndexCreateGenerated

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.265 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_FCVGUIDToModuleOwner source text reference
  • references source dbo.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.QBM_PIndexCreate source text reference
  • references source dbo.QBM_PIndexCreateGenerated_XA source text reference
  • references source dbo.QBM_PIndexCreateGenerated_XI source text reference
  • references source dbo.QBM_PIndexCreateGenerated_XO source text reference
  • references source dbo.QBM_PIndexCreateGenerated_XR source text reference
  • references source dbo.QBM_PIndexCreateGenerated_XX source text reference
  • references source dbo.QBM_PIndexDrop source text reference
  • references source dbo.QBM_PIndexDropRedundant source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

Complete Source

SQL53 lines
1CREATE PROCEDURE QBM_PIndexCreateGenerated(2  @TablePattern varchar(64),3  @ModuleNameOrPattern varchar(16) = '%'4)5AS6BEGIN7  DECLARE @TableName varchar(30)8  DECLARE @Names TABLE(TableName varchar(30) collate database_default)9  DECLARE @DebugSwitch int = 010  SET XACT_ABORT OFF11  BEGIN TRY12    INSERT INTO @Names(TableName)13    SELECT t.TableName14    FROM DialogTable t15    WHERE16      t.TableType IN('B',17    'T') AND t.TableName LIKE @TablePattern AND dbo.QBM_FCVGUIDToModuleOwner(t.UID_DialogTable) LIKE @ModuleNameOrPattern18    SELECT @TableName = '#'19    WHILE @TableName > ' '20    BEGIN21      SELECT @TableName = NULL22      SELECT TOP 1 @TableName = n.TableName23      FROM @Names n24      IF @TableName IS NULL25      BEGIN26        CONTINUE27      END28      DELETE @Names29      WHERE30        TableName = @TableName31      IF @DebugSwitch > 032      BEGIN33        print @tablename34      END35      EXEC QBM_PIndexCreateGenerated_XO @TableName36      EXEC QBM_PIndexCreateGenerated_XI @TableName37      EXEC QBM_PIndexCreateGenerated_XR @TableName38      EXEC QBM_PIndexCreateGenerated_XA @TableName39      EXEC QBM_PIndexCreateGenerated_XX @TableName40      EXEC QBM_PIndexDropRedundant @TableName41    END42  END TRY43  BEGIN CATCH44    EXEC QBM_PSessionErrorAdd DEFAULT45    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()46    RAISERROR(@Rethrow,47    18,48    1)49      WITH NOWAIT50  END CATCH51  ende:52  RETURN53END
Open raw exported source
SQL ยท Raw10 lines
1       create   procedure QBM_PIndexCreateGenerated ( @TablePattern varchar(64) , @ModuleNameOrPattern varchar(16) = '%'  ) as begin declare @TableName2 varchar(30) declare @Names table (TableName varchar(30) collate database_default ) declare @DebugSwitch int = 0 SET XACT_ABORT OFF BEGIN TRY insert into3 @Names(TableName) select t.TableName from DialogTable t where t.TableType in ('B', 'T') and t.TableName like @TablePattern and dbo.QBM_FCVGUIDToModuleOwner4(t.UID_DialogTable) like @ModuleNameOrPattern select @TableName = '#' while @TableName > ' ' begin select @TableName = null select top 1 @TableName = n.TableName5 from @Names n if @TableName is null begin continue end delete  @Names where TableName = @TableName if @DebugSwitch > 0 begin print @tablename end     6    exec QBM_PIndexCreateGenerated_XO @TableName    exec QBM_PIndexCreateGenerated_XI @TableName    exec QBM_PIndexCreateGenerated_XR @TableName    exec7 QBM_PIndexCreateGenerated_XA @TableName     exec QBM_PIndexCreateGenerated_XX @TableName  exec QBM_PIndexDropRedundant @TableName end  END TRY BEGIN CATCH8 exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH 9ende: return end 10