SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


VBScript Class to Return Backup Information


VBScript Class to Return Backup Information

Author
Message
bmsjr
bmsjr
SSC-Addicted
SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)

Group: General Forum Members
Points: 493 Visits: 6
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/bszabo/sqlbackups2.asp


Bruce Szabo, MCSE+I, MCDBA, MCSD
Andy Warren
Andy Warren
SSC-Dedicated
SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)

Group: Moderators
Points: 37150 Visits: 2762
Interesting. For me it would be easier to read if you broke up the source code and put your comments/discussion just above the pertinent code. Scrolling up/down isnt fun. Thats just me!

On the code, you mention it will return the list of backups, but you're only getting the most recent?


Andy
http://www.sqlservercentral.com/columnists/awarren/

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
bmsjr
bmsjr
SSC-Addicted
SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)

Group: General Forum Members
Points: 493 Visits: 6
By list I guess I meant for each database. It would be easy enought to create something that would search for the backups of a given database. In my case I was writing something so the IT department could tell if a backup was successful or not.


Bruce Szabo, MCSE+I, MCDBA, MCSD


Bruce Szabo, MCSE+I, MCDBA, MCSD
Andy Warren
Andy Warren
SSC-Dedicated
SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)

Group: Moderators
Points: 37150 Visits: 2762
Gotcha. Couple other notes. One is I hate to see code without error handling. Another is..I dont see where you are setting your connection to nothing, just closing it? Finally, why are you basically repeating your code in multiple lets? I'd rather see one 'GetHistory' method that calls a private routine.

Interesting idea to encapsulate it. Looking forward to seeing your asp implementation.

Andy
http://www.sqlservercentral.com/columnists/awarren/

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
bmsjr
bmsjr
SSC-Addicted
SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)

Group: General Forum Members
Points: 493 Visits: 6
Thanks for the info Andy, some definite oversites on my part. I try to write some generic routines and put the articles out so they are generic enough that they may be useful. Then I go to work on my specific problem. I always end up with a better implmentation but I have found the code is sometimes light. I may have to change this methodolgy of article writing.

The problem I am having with VBScript is that there is no "on error go to". It is killing me. I would like to do more error handling also but without the flexibilty the code get sloppy, quick.

The last article I actually use more as a script to display to the users. I have the ASP implementation if you want me to send it to you, otherwise, I may have to write a 4th part of the article.



Bruce Szabo, MCSE+I, MCDBA, MCSD


Bruce Szabo, MCSE+I, MCDBA, MCSD
ckempste
ckempste
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4337 Visits: 1
Hi

Although fine, its all overally complex for a simple task. I can never understand why people use everything else (like SQL*DMO), vb-script, extended stored procs etc etc to do backups/report with either a maintenace plan or a simple t-sql script is more than enough. They are simple to read, quick to change (no recompiling etc) and doesnt require any special skills.

Even so, the article does give another viewpoint and just shows that there are hundreds of ways to script up routines for your DB managemebt.

Just my 2c worth.

Cheers

Ck


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Andy Warren
Andy Warren
SSC-Dedicated
SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)

Group: Moderators
Points: 37150 Visits: 2762
I wouldnt worry about changing your style too much - just try to put yourself in the readers shoes if you can. Dont know that I succeed at that myself! I think the combination of the article and the follow up discussion like this one serve the reader pretty well.

Chris,

I think one reason is it depends on your background. If you're a VB and/or object guy, DMO is a natural way to address a problem. If you do it as script you can still change on the fly. I use both techniques.

Andy
http://www.sqlservercentral.com/columnists/awarren/

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
bmsjr
bmsjr
SSC-Addicted
SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)SSC-Addicted (493 reputation)

Group: General Forum Members
Points: 493 Visits: 6
The feedback to ther articles is amazing. In some cases just some ratings feedback is nice but it is a lot more humbling putting an article up and knowing people will get to comment on it.

There was a "Sex in the City" episode recently about how we judge ourselves by our critics and their view of us. In most cases it is the negative critics. It was a nice episode for article writers to see.


Bruce Szabo, MCSE+I, MCDBA, MCSD


Bruce Szabo, MCSE+I, MCDBA, MCSD
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