Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

Backup Monitoring and Reporting Expand / Collapse
Author
Message
Posted Tuesday, October 6, 2009 1:59 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 9, 2010 4:10 AM
Points: 70, Visits: 117
Hello Chad
I've tried to change it so that it picks up the backups over the weekend but I've failed miserably!
Could you advise what I need to do to modify this so that the report shows every day in the drop down, rather than just Monday-Friday. Thanks very much in advance
Post #798352
Posted Tuesday, October 6, 2009 3:20 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 3:35 PM
Points: 259, Visits: 715
jackie.jones (10/6/2009)
Hello Chad
I've tried to change it so that it picks up the backups over the weekend but I've failed miserably!
Could you advise what I need to do to modify this so that the report shows every day in the drop down, rather than just Monday-Friday. Thanks very much in advance


You'll need to change the insert dt_dim logic. This is where the query takes into account your backup windows. I'm using Monday through Thursday midnight through the 6 AM the next day 30 hours and on Friday a 78 hours. These lines need to be changed:

WHEN DATEPART(dw,SeqDate) BETWEEN 2 AND 5 THEN DATEADD(hh,30,SeqDate)
WHEN DATEPART(dw,SeqDate) = 6 THEN DATEADD(hh,78,SeqDate)

2 through 5 is Monday through Thursday
6 is Saturday

Does this make sense? If you want, post your backup window and schedule and I'll tweak the query and post it here.



Post #798828
Posted Wednesday, October 7, 2009 2:04 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 9, 2010 4:10 AM
Points: 70, Visits: 117
Hello

I think I did that bit right because when I looked in the table dt_dim where it had previously had Nulls for the weekends, it now has the dates correctly shown up until the end of this year, with no gaps for weekends.
In the reports however, it still only shows the week days in the drop down. When I checked the query in the reports the problem seemed to be due to the link between dt_dim and backup_fact (by the dt_id) as the backup_fact contains gaps for the weekends presumably. E.G. the dt_id jumps from 40079 to 40082 and from 40086 to 40089 etc, etc), so I guess that's why it doesn't show in the drop down? I guessed therefore that I've missed something else to update.

Thanks for your speedy reply too
Jackie
Post #798984
Posted Wednesday, October 7, 2009 3:58 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 3:35 PM
Points: 259, Visits: 715
jackie.jones (10/7/2009)
Hello

I think I did that bit right because when I looked in the table dt_dim where it had previously had Nulls for the weekends, it now has the dates correctly shown up until the end of this year, with no gaps for weekends.
In the reports however, it still only shows the week days in the drop down. When I checked the query in the reports the problem seemed to be due to the link between dt_dim and backup_fact (by the dt_id) as the backup_fact contains gaps for the weekends presumably. E.G. the dt_id jumps from 40079 to 40082 and from 40086 to 40089 etc, etc), so I guess that's why it doesn't show in the drop down? I guessed therefore that I've missed something else to update.

Thanks for your speedy reply too
Jackie


Looking at this little further, the insert_backup_fact_sp is also customized to my environment and checks dw (day of week) between 2 and 6 (Monday and Saturday). Remove/comment out this line:

AND d.dw BETWEEN 2 AND 6

Then truncate backup_fact and re-run inserver_backup_fact and update_backup_fact_sp



Post #799589
Posted Thursday, October 8, 2009 1:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 7, 2010 12:26 AM
Points: 4, Visits: 29
Somebody please help me .

I dont have powershell on my server since its a Windows 2003 Server

Is there alternateive procedures written for this.

Kindly help

Thanks
Navendu
Post #799749
Posted Thursday, October 8, 2009 1:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 7, 2010 12:26 AM
Points: 4, Visits: 29
Somebody please help me . i can't run backupAnalysis.ps1 script

I dont have powershell on my server since its a Windows 2003 Server

Is there alternateive procedures written for this.

Kindly help

Thanks
Navendu
Post #799752
Posted Thursday, October 8, 2009 1:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 7, 2010 12:26 AM
Points: 4, Visits: 29
Somebody please help me . i can't run backupAnalysis.ps1 script

I dont have powershell on my server since its a Windows 2003 Server

Is there alternateive procedures written for this.

Kindly help

Thanks
Navendu
Post #799753
Posted Thursday, October 8, 2009 1:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 7, 2010 12:26 AM
Points: 4, Visits: 29
Can you please help me . i can't run backupAnalysis.ps1 script

I dont have powershell on my server since its a Windows 2003 Server

Is there alternateive procedures written for this.

Kindly help

Thanks
Navendu
Post #799754
Posted Thursday, October 8, 2009 2:33 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 9, 2010 4:10 AM
Points: 70, Visits: 117
Hello Navendu
They're probably still sleeping over in the USA so thought I would post the link where you can download powershell for windows server 2003. My server is Windows 2003 and powershell worked fine. Once you've downloaded it, select it from the start menu. It loads a window similar to a command prompt. Navigate to where you've stored your backupanalysis.ps1 file and then type .\backupanalysis.ps1 (exactly as Chad detailed in his instructions)
The link is http://www.microsoft.com/downloads/details.aspx?FamilyId=10EE29AF-7C3A-4057-8367-C9C1DAB6E2BF&displaylang=en
Regards
Jackie
Post #799780
Posted Thursday, October 8, 2009 3:09 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 9, 2010 4:10 AM
Points: 70, Visits: 117
Hello Chad
That's great - hadn't spotted that extra update was required and all is fine now - you're a star!
I did give myself a panic moment though by gleefully removing all data and then running the jobs to re-populate them and then wondering why there was nothing there. Your instructions saved the day again though as I noticed the comment that the powershell script is set to only pick up new rows. Temporarily removed that line, ran it all again and Bingo
Thanks again
Jackie
Post #799810
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse