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.
Author |
Topic |
Westside
Starting Member
9 Posts |
Posted - 2010-03-09 : 23:41:40
|
Hi,I am using SQL 2008 and I'm trying to learn and actually defrag my indexes on a few databases. I'm using this query to see which databases need their indexes rebuiltSELECT s.name, st.*FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, NULL) stINNER JOIN sys.databases s ON s.database_id = st.database_idWHERE avg_fragmentation_in_percent > 30ORDER BY avg_fragmentation_in_percent descI then run the script found here:http://sqlfool.com/2009/06/index-defrag-script-v30/I don't get any error but the values in the "avg_fragmentation_in_percent" column don't change. I'm unclear why.Any help appreciated |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|