Как переиндексировать все пользовательские таблицы SQL 1С
Код на SQL
1 2 3 4 5 6 7 8 9 10 11 12 13 |
CREATE PROCEDURE sp_DBReindex AS SET NOCOUNT ON DECLARE @TableName char(32) DECLARE SysCur CURSOR FOR S_elect name FROM sysobjects WHERE type='U' OPEN SysCur FETCH NEXT FROM SysCur INTO @TableName WHILE @@FETCH_STATUS=0 BEGIN DBCC DBREINDEX(@TableName) FETCH NEXT FROM SysCur INTO @TableName END CLOSE SysCur DEALLOCATE SysCur |