Comments
2 comments
-
Is it possible to use the EXCLUDE keyword, or the wildcard '*' options instead of listing all the databases?
EXCLUDE backs up all databases except the ones included in the list e.g.EXEC master..sqlbackup '-sql "BACKUP LOGS EXCLUDE [master, model, tempdb] ... " '
The wildcard option will back up all databases running in full or bulk logged recovery models when used with the BACKUP LOGS command e.g.EXEC master..sqlbackup '-sql "BACKUP LOGS [*] ... " '
-
The 3,200 character limitation is a restriction of the SQL Server Agent's job steps, rather than with SQL Backup directly (which in v5 can support up to 64,000 characters in a command).
In addition to what Peter suggested, if you have generated the command using the GUI, you have the option to save the backup command as a "template". You can then use the following syntax to execute the backup command via the template:
execute master..sqlbackup '-USE "<template_name>"';
This may help get around the limitation...
Hope that helps,
Jason
Add comment
Please sign in to leave a comment.
Is there a way to work around this limitation in SQLBackup?
We have 200+ databases and while trying to create a TLog backup job I get the error that it could not write the command because: @command is too long. "It is to be no more than 3200 characters."
Thanks.