views:

32

answers:

1

Hi any body help to tell me how to create a Procedure to defrag index on a daily basis in MS SQL Server 2000.

Appreciate your answers

Joseph

+2  A: 

One of the simplest ways:

EXEC sp_MSForEachTable 'DBCC DBREINDEX (''?'', '''', 90) '

There are several other alternatives where folk has out together some intelligent code, but I've not used them

gbn
thanks you . i tried this and its working fine
Joseph