• Wow, so many negative opinions, I read it and just take away whatever I can, doesn't hurt me anyway

    By the way, to continue on SP_MSforeachdb.... I know it's undocumented (maybe unsupported too)

    but it's so cool to use it, and short neat code

    User DB backup

    SP_MSforeachdb 'if ''?'' NOT IN (''tempdb'',''master'',''model'',''msdb'') BACKUP DATABASE ? TO DISK = ''C:\backup\?.bak'' WITH INIT'

    System DB backup

    SP_MSforeachdb 'if ''?'' IN (''tempdb'',''master'',''model'',''msdb'') BACKUP DATABASE ? TO DISK = ''C:\backup\?.bak'' WITH INIT'

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005