By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,567 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,567 IT Pros & Developers. It's quick & easy.

Modifying SQL Server 2000 Maintenance Plans through Scripting

P: n/a
I have a problem that I would like to resolve through scripting, but
I'm not sure how to go about it (or if it's even possible.)

We're trying to work around a bug (
) that requires us to split up our maintenance plan into two parts.
In the first, we backup "All User Databases". This runs fine. The
second maintenance plan backs up the transaction logs and then is
SUPPOSED to delete the ones older than 4 days. If you read that
knowledge base article I referenced above, you'll see that this
doesn't happen. Our company creates a lot of databases every day and
it's not feasible for me to check every one by hand every night before
I head home to make sure that they get backed up correctly.

I would like to have a script that checks for all user databases that
are set to FULL Recovery Model

SELECT name, DATABASEPROPERTYEX(name, 'Recovery') as RecoveryModel
FROM master.dbo.sysdatabases

and re-enters them all into the second maintenance plan (obviously not
as duplicates) right before it runs. I don't think my scripting
knowledge is up to par, so I'm really looking for someone to help me
out. You can bet I'll study the solution after I get it though.

Thanks in advance.


Apr 24 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.