dbo.QBM_PIndexDropRedundant
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
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_PIndexDrop source text reference
- references source dbo.QBM_PIndexDropRedundant_i source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
Complete Source
1CREATE PROCEDURE QBM_PIndexDropRedundant(2 @TablePattern nvarchar(64)3)4AS5BEGIN6 DECLARE @TableName varchar(30)7 SET XACT_ABORT OFF8 BEGIN TRY9 SELECT @TableName = N '#'10 WHILE @TableName IS NOT NULL11 BEGIN12 SELECT TOP 1 @TableName = name13 FROM sys.tables t14 WHERE15 t.name LIKE @TablePattern AND len(t.name) <= 30 AND t.name > @TableName AND t.is_memory_optimized = 016 ORDER BY name17 IF @@rowcount = 018 BEGIN19 SELECT @TableName = NULL20 END21 IF @TableName IS NOT NULL22 BEGIN23 EXEC QBM_PIndexDropRedundant_i @TableName24 END25 END26 END TRY27 BEGIN CATCH28 EXEC QBM_PSessionErrorAdd DEFAULT29 RAISERROR('',30 18,31 1)32 WITH NOWAIT33 END CATCH34 ende:35 RETURN36END
Open raw exported source
1 create procedure QBM_PIndexDropRedundant ( @TablePattern nvarchar(64) ) as begin declare @TableName varchar(30) SET XACT_ABORT OFF BEGIN TRY 2 select @TableName = N'#' while @TableName is not null begin select top 1 @TableName = name from sys.tables t where t.name like @TablePattern and len(t.name3) <= 30 and t.name > @TableName and t.is_memory_optimized = 0 order by name if @@rowcount = 0 begin select @TableName = null end if @TableName is not 4null begin exec QBM_PIndexDropRedundant_i @TableName end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END5 CATCH ende: return end 6