Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 index defrag

Author  Topic 

yslatha
Starting Member

8 Posts

Posted - 2007-12-05 : 00:18:23
I am new to sql server and we have sql server 2000

DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PS_ORD_LINE )
DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PS0ORD_LINE )
DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PSAORD_LINE )
DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PSBORD_LINE )
DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PSCORD_LINE )
DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PSEORD_LINE )
DBCC INDEXDEFRAG ( 0, PS_ORD_LINE, PSFORD_LINE )

Please somebody give me for sql server 2005 scripts for above.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-05 : 02:27:00
ALTER INDEX is what we use for SQL Server 2005. The REORGANIZE option of ALTER INDEX replaces DBCC INDEXDEFRAG and the REBUILD replaces DBCC DBREINDEX.

Check out my defrag code:
http://weblogs.sqlteam.com/tarad/archive/2007/11/27/60415.aspx



Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -