Backup job script - AlwaysON Availability Groups

  • I would like to know how others track msdb backupset data when a failover happens? Which script do you use to maintaining full, differential and t-log backups.

  • I STRONGLY recommend everyone use Ola.Hallengren.com's full maintenance suite. FREE, incredibly flexible and powerful, supported, does ALL of your MX needs.

    A key point though is that YOU must understand AGs and your environment and HA/DR plan (you DO have one of those, right??) to make sure you know what is supposed to happen, configure everything to execute that plan and then TEST to make sure it does as expected in both directions.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • I am big fan of Ola's script too, the only problem is it doesn't create multiple jobs. I used his script for DBCC but i had to make quite few modifications to make it granular. We have 300 + databases in a instance, could you imagine to have one job backing up 300 + databases? Also i think i did glance through his script, it doesn't have a smart way to get msdb backup set data.

  • curious_sqldba (1/28/2016)


    I am big fan of Ola's script too, the only problem is it doesn't create multiple jobs. I used his script for DBCC but i had to make quite few modifications to make it granular. We have 300 + databases in a instance, could you imagine to have one job backing up 300 + databases? Also i think i did glance through his script, it doesn't have a smart way to get msdb backup set data.

    1) You can easily script the created job and automate the creation of 300 individual ones per database name if you want.

    2) Yes, I HAVE had one job backing up 300+ databases. In fact I have had over 7400 databases running on ONE server backed up with ONE job (well two - one did about 20 global databases and the other did all the rest of the client dbs). And those were all custom-log-shipped over to a standby/reporting server. 😎

    3) Not sure exactly what you need the msdb backup set data for, but you have his code and can do any thing you want with it. Improve it to work the way you need if it doesn't already.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • TheSQLGuru (1/28/2016)


    curious_sqldba (1/28/2016)


    I am big fan of Ola's script too, the only problem is it doesn't create multiple jobs. I used his script for DBCC but i had to make quite few modifications to make it granular. We have 300 + databases in a instance, could you imagine to have one job backing up 300 + databases? Also i think i did glance through his script, it doesn't have a smart way to get msdb backup set data.

    1) You can easily script the created job and automate the creation of 300 individual ones per database name if you want.

    2) Yes, I HAVE had one job backing up 300+ databases. In fact I have had over 7400 databases running on ONE server backed up with ONE job (well two - one did about 20 global databases and the other did all the rest of the client dbs). And those were all custom-log-shipped over to a standby/reporting server. 😎

    3) Not sure exactly what you need the msdb backup set data for, but you have his code and can do any thing you want with it. Improve it to work the way you need if it doesn't already.

    i) Managing 900 jobs ( full, diff and t log) would be night mare.

    2) VERY Cool 🙂

    3) In case of failover it has to look at backup . Yeah i could use linked servers, but not having msdb back up data synchronized is big bummer for me.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply