Comments
3 comments
-
As an aside, a suggested improvement is to provide an INFOONLY or SIMULATE option for the sqlbackup stored procedure that would let us test the syntax of commands sent without actually performing the backups. The procedure could report the names of the databases that would be backed up, and the names of the files that would be created (thus validating the server names and folder paths provided) but wouldn't actually run the backup and wouldn't update any of the logs tracked by Sql Backup.
-
And one more question: What if a database name contains a comma? I presume it cannot be included in the list of databases when using "BACKUP DATABASES", since the delimeter in that list is a comma and additional square brackets in the list are not allowed. I don't, in fact, have any databases with a comma in the name, but it is a possibility. The help doesn't mention any special delimiters (e.g. single quotes) to use when adding databases to the '[ list_of_databases ] ' for the BACKUP DATABASES command in case any of the databases have non-standard characters (in particular a comma or space) in the name.
-
Try limiting the length of the parameter to about 60000 chars', or 30000 nchars'.
Your suggestion re a 'simulation' mode is noted, as are your comments on database names using 'special' characters. You can use the single database backup syntax to backup such databases in any case e.g.EXEC master..sqlbackup '-sql "BACKUP DATABASE [a,b] TO ..." '
Add comment
Please sign in to leave a comment.
The reason I ask is that the BACKUP DATABASES syntax could get quite long if using 32 databases (the maximum allowed by sqlbackup) and if the DB names are long. For example, 32 databases with 64 character names gives 2048 characters, and if the parameter type for the stored procedure is nvarchar, then that's a 4096 length string for the database names alone. When constructing the list of databases to send to sqlbackup, I can monitor the length of the string while adding DBs to the list, but I'd like to know what limits I should be checking for. Some example code:
Thanks,
Matt