List of Databases:
AABBABA, ABABAAA, AAABABA, BABABAA, BAAABAA
Example GUI
=======================
[x] AABBABA
[x] BABABAA
[ ] ABABAAA
[x] BAAABAA
[x] AAABABA
EXAMPLE SCRIPT (pseudo code)
=======================
BACKUP: ABABAAA,BABABAA,AAABABA,AABBABA
Quick - Tell me which DB isn't being backed up using the GUI, and which DB
isn't being backed up with the script. Which takes longer to do? Now imagine
that you have 200 databases instead of 5 and maybe you will start to
understand why I'd rather work with a GUI than a script. :)
Ok so maybe my example is a bit exaggerated but not by far - our DBs use
strict naming conventions which are very similar but slightly different. It's
easy to inadvertently miss a DB when you're using scripts, versus a GUI with
checkboxes.
Granted I'm sure there is some way of specifying ranges of databases (A-H,
I-J, etc) using a script, but the script would have to be quite a bit more
sophisticated. Somehow query for a list of databases (I'm not sure how you
would obtain that), and then break them up into ranges (again not sure how
the logic on that work?).
Regarding your car mechanic analogy - sure I know how to do some basic
select, join, update, and delete statements but TSQL certainly looks a heck
of a lot more complicated than a few simple SQL statements. I'm assuming you're
a DBA so I'm sure these all seems simple to you, but to me, it certainly
doesn't. I don't mean to seem ungrateful - I'm sure you're trying to help
and I appreciate that.
Brad
[quoted text, click to view] "Tracy McKibben" <tracy@realsqlguy.com> wrote in message
news:450708EC.6050305@realsqlguy.com...
> Brad Baker wrote:
>>> The backup script that I sent you DOES NOT require you to type in
>>> database names.
>>
>> Based on my understanding utilizing your script would require one of two
>> approaches:
>>
>> 1) Backup all DBS simultaneously - we cannot do this it would take too
>> long. I.E. DB backups would run into prime time when the servers are in
>> use.
>>
>> 2) Setup multiple scripts, type the names of DBs in each script - which
>> is error prone and time consuming.
>
> With minimal effort, my backup script (or ANY backup script) could be
> modified to limit what DB's it touches, like by doing databases starting
> with A-H on Monday, I-Q on Tuesday, R-Z on Wednesday, or whatever you
> want.
>
>> As previously mentioned the other problem with your scripts is that they
>> do not seen to do optimizations or integrity checks. Although I found
>> another
>
> I gave you two scripts, one for backups, one for "optimizations", i.e.
> rebuilding fragmented indexes.
>
>> TSQL script that does do everything here:
>>
http://www.sqldbatips.com/displaycode.asp?ID=26 >>
>>
>>> Any experienced DBA will tell you that scripts are the way to go.
>>
>> I'm not a DBA. We don't have a DBA on staff. We probably should, but we
>> don't so we have to make due with what we have. So that leaves two
>> options:
>>
>> 1) Hire a DBA/consultant to code this - which will probably be costly
>> 2) Myself or another person on staff has to learn TSQL for the sole
>> purpose of generating maintenance plans.
>
> I'm not a mechanic, but I did learn to change my own oil and do basic car
> maintenance so I'm not dependent on my car dealership. If you're writing
> applications that run against SQL Server, shouldn't you know a bit about
> SQL?
>
>
>> Neither of the approaches above sounds like a good solution but I guess
>> those are the options we've been left with.
>>
>
> I guess all I can say is "Good luck"...
>
>
> --
> Tracy McKibben
> MCDBA
>
http://www.realsqlguy.com