Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Index Rebuilds in sql 2000

Status
Not open for further replies.
Jun 19, 2002
294
US
Is there a way to tell the last time an index was rebuilt (using dbcc reindex) in sql 2000? We are looking for a quick way to validate a script - I can see the create date for foreign and primary keys but, not for normal indices.....

Thanks,
 
I do not think that there is.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I tried checking the last update of statistics which is done also when you run dbcc reindex however, I am a little confused. We run the reindex by table. The prior table shows the stats where updated. This table had shown 3 indexes had been rebuilt when the process was killed. When I look at the update stats date it is showing last weekend (when we last ran update stats) All the indices show up but, I am wondering what is being done under the covers when you run dbcc reindex? Does it rename then create then drop the indices?

Below is a script that can be used to check the last time the stats were updated.

SELECT o.name AS Table_Name,i.name AS Index_Name,
STATS_DATE(o.id,i.indid) AS Date_Updated FROM sysobjects o
JOIN sysindexes i ON i.id = o.id
WHERE xtype = 'U' AND
o.name ='FinalizeHistory'
/* i.name IS NOT NULL
ORDER BY o.name ASC,i.name ASC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top