SQL Server 2005 IndexOptimize SP for a single table index

I am trying to figure out how to use this IndexOptimize stored procedure, which I got from http://ola.hallengren.com/ to work with just single table indexes.

When I run the following query:

 SELECT * FROM sys.dm_db_index_physical_stats (DB_ID(N'database_name'), OBJECT_ID(N'dbo.table_name'), NULL, NULL , 'DETAILED');' 

I get this as a result both before and after completing the IndexOptimize task:

http://cl.ly/image/472J160R1y2n

Here is what I am trying to run:

 EXECUTE dbo.IndexOptimize @Databases = 'database_name', @Indexes = 'database_name.dbo.table_name', @FragmentationLow = NULL, @FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE', @FragmentationHigh = 'INDEX_REBUILD_ONLINE', @FragmentationLevel1 = 5, @FragmentationLevel2 = 30' 

The query is complete, but it does not seem to matter for table indexes. Did I miss something?

+4
source share
1 answer

You only decided to allow rebuilding indexes that have> 30% fragmentation. Online index recovery is only an Enterprise feature. Are you using SQL Server Enterprise?

0
source

Source: https://habr.com/ru/post/1442145/


All Articles