February 5, 2008 at 4:07 am
Nowadays my database is running very slow.
So I have decided to do re indexing & defragmentation.
I have did shrinking of database.
Here first time I am doing re indexing & defragmentation of database.
How do I go for this. Is there any procedure for this task.
What are the commands/stored proc, steps take to consider.
please reply soon __.____._
Regard
Majid
February 5, 2008 at 4:19 am
mjafar (2/5/2008)
Nowadays my database is running very slow.So I have decided to do re indexing & defragmentation.
I have did shrinking of database.
Here first time I am doing re indexing & defragmentation of database.
How do I go for this. Is there any procedure for this task.
What are the commands/stored proc, steps take to consider.
please reply soon __.____._
Regard
Majid
You could rebuild or defragment your indexes using ALTER INDEX statements. Whether to rebuild, defragment or do nothing, you can decide based on the output of sys.dm_db_index_physical_stats, This is described in a lot of detail in Books Online under http://technet.microsoft.com/en-us/library/ms189858.aspx.
Regards,
Andras
February 5, 2008 at 3:59 pm
You can construct an SSIS package from Management Studio to accomplish your goal; remember to schedule the associated Agent Job.
To save time and system resources you may want to start w/ a Reorganize Index task in your package instead of Rebuild Index.
February 5, 2008 at 11:51 pm
And don't run a shrink of the data files - it will cause fragmentation. I documented this in SS2005 Books Online for DBCC SHRINKDATABASE. See http://www.sqlskills.com/blogs/paul/2007/11/13/AutoshrinkTurnItOFF.aspx for an example.
Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
February 5, 2008 at 11:57 pm
Refer to OP's other post on this please- Reindexing and defragmentation (SQL 2000)
Apparently server is 2000, post was initially in wrong forum.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply