Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backup Monitoring and Reporting


Backup Monitoring and Reporting

Author
Message
jackie.jones
jackie.jones
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
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
cmille19
cmille19
SSC Veteran
SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)

Group: General Forum Members
Points: 275 Visits: 724
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.



jackie.jones
jackie.jones
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
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
cmille19
cmille19
SSC Veteran
SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)

Group: General Forum Members
Points: 275 Visits: 724
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



navendu.mohanty
navendu.mohanty
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
navendu.mohanty
navendu.mohanty
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
navendu.mohanty
navendu.mohanty
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
navendu.mohanty
navendu.mohanty
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
jackie.jones
jackie.jones
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
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
jackie.jones
jackie.jones
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search