Ramblings of a DBA

Tara Kizer
posts - 166, comments - 835, trackbacks - 75

My Links

Advertisement

News

Subscribe
Search this Blog

Archives

Post Categories

Work

June 2009 Blog Posts

Defragmenting/Rebuilding Indexes in SQL Server 2005

UPDATE: A new version of this stored procedure is available.  Please check it out here. I have modified isp_ALTER_INDEX, which is the stored procedure that I use to defragment/rebuild indexes in SQL Server 2005.  The changes include two bug fixes and one feature request.  The first bug fix was reported by Fedor Baydarov.  He found that @lobData was not being re-initialized to zero after a LOB data type was encountered.  This meant that the rest of the indexes to be processed were being done offline even if the online option was available.  D’oh! The second bug fix is that it didn’t check for...

posted @ Tuesday, June 23, 2009 2:48 PM | Feedback (7) |

SQL Server Script to Display Job History

I was going through my scripts today and found one that I’d like to share.  This SQL Server script will display job history.  The benefit of this script over displaying it from the GUI is that you get to see the job durations quickly.  /div>/td>/tbody>/form>/html>]]> select job_name, run_datetime, run_duration from ( select job_name, run_datetime, SUBSTRING(run_duration, 1, 2) + ':' + SUBSTRING(run_duration, 3, 2) + ':' + SUBSTRING(run_duration, 5, 2) AS run_duration from ( ...

posted @ Wednesday, June 10, 2009 11:29 AM | Feedback (2) |

Powered by:
Powered By Subtext Powered By ASP.NET