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

back up all system databases

dwjongbloeddwjongbloed Posts: 30
edited April 3, 2008 9:22AM in SQL Backup Previous Versions
:?:

is there a way to back up all the system databases via 1 script line like you can do single databases? Or do I have to do each system database seperately as in the script?

Comments

  • Options
    peteypetey Posts: 2,358 New member
    via 1 script line like you can do single databases
    Do you mean the BACKUP DATABASES [*] ... syntax?

    The only way to back up all system databases using a single script is to name each of the system database e.g.
    EXEC master..sqlbackup 'sql "BACKUP DATABASES [master, model, msdb] TO DISK = ...
    
    You may need to add more depending on whether you are running replication and want to include the system replication databases.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    I believe this is exactly what I'm looking for.
Sign In or Register to comment.