|
Posted by m19peters on 04/05/07 13:35
On Apr 4, 6:21 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> (m19pet...@gmail.com) writes:
> > We have ascriptthat I had to rework a little bit for 2005 that does
> > afullbackupfor every database on theserver... For some reason on
> > some nights thescriptdoes notbackupall databases... Its like it
> > skips over it for some reason... Output of thescriptbelow on the
> > night in question was:
>
> I don't see any apparent flaws, but two thoughts:
>
> 1) Make the cursor over sys.databases INSENSITIVE. The default cursor
> type is dynamic, and it makes me nervous.
>
> 2) You should probably have some TRY-CATCH around thebackupcommands.
> Ifbackupfails with an error that aborts the batch you will not
> backupthe rest of the databases.
>
> --
> Erland Sommarskog,SQLServerMVP, esq...@sommarskog.se
>
> Books Online forSQLServer2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online forSQLServer2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Both very good ideas... thats probably why I didn't think of them...
I'll give it a try and let you know.
Navigation:
[Reply to this message]
|