What are the challenges you face when working across database platforms? Take the survey

Backup command with USER Databases

chapwolffchapwolff Posts: 2 Bronze 2
edited May 6, 2016 5:50AM in SQL Backup Previous Versions

We are trying to streamline a process with the SQL backup. Currently all of our backup jobs that do bulk work, have the databases manually put in there. So if a database gets added we have to go in and add it. I know that the redgate tool has a USERDB's hint to deal with this but before we switch over I need to confirm something. For transaction log backups, does this take into account that some databases aren't in FULL recovery? More to the point, if a databases is in SIMPLE, will the redgate tool just skip over that DB or will it cause an error? This is very important to my team. If you could, can you attach documentation? Thanks for the help.


  • Options
    Hi chap Wolffe,

    Thanks for posting on the Redgate forums.

    The SQL Backup engine is aware when a database is in SIMPLE recovery and won't try to perform a log backup when doing a bulk backup. The following T-SQL will skip out any database in the SIMPLE recovery model.

    EXECUTE master..sqlbackup '-SQL "BACKUP LOGS [*] TO DISK = ''C:Backups<AUTO>''"'

    The most relevant documentation can be found at the link below. Whilst this doesn't confirm what I have stated here it will give you some further hints on things you may need to think about.

    http://documentation.red-gate.com/displ ... n+instance
    Kind regards,
    Dan Bainbridge
    Product Support Engineer | Redgate Software
Sign In or Register to comment.