Reply to Modifying SQL Server 2000 Maintenance Plans through Scripting

Your name:

Reply:


Posted by pk on 04/24/07 16:34

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 (
http://support.microsoft.com/default.aspx?scid=kb;en-us;303292&Product=sql2k
) 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
WHERE DATABASEPROPERTYEX(name, 'Recovery') = 'FULL'
ORDER BY 2

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.

-pk

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация