Just got an email from http://www.sql-server-performance.com/default.asp
And they had a great link to an article from Brian Knight that discusses Disaster recovery and is “A Survival Toolkit for the DBA“. It even comes with a bunch of scripts already written. I always liked reading Brian's stuff, and he continues his engaging style in this document.
AND, I did not know that Brian was a co-founder of http://www.sqlservercentral.com/
Here's the link to the Article.
Wow...it's been 2 months...
It seems there's a common question discussiong how to eliminate holidays (and weekends) from date ranges. And since I'm sick of doing a search to find it, I'd thought I'd post it. Also, people ask about daylight savings time. This is the same type of thing, but since it's regional, there the added twist of having to know where you are. Anyway, here's the code:
CREATE TABLE WeekEndsAndHolidays (DayOfWeekDate datetime, DayName char(3))GOSET NOCOUNT ONDECLARE @FirstSat datetime, @x intSELECT @FirstSat = '1/3/2004', @x = 1 --Add WeekEndsWHILE @x < 52BEGIN INSERT INTO WeekEndsAndHolidays(DayOfWeekDate, DayName) SELECT DATEADD(ww,@x,@FirstSat), 'SAT' UNION ALL SELECT DATEADD(ww,@x,@FirstSat+1), 'SUN' SELECT...