Thanks for your post. When using the extended stored procedure, the parameters must be surrounded by one set of single quotes, so any variables inside the command must be surrounded by two sets of single quotes (or square brackets). If your database name includes spaces, you should surround it with square brackets, rather than two pairs of single quotes. Your command should look like this (replacing variables and WITH options as required):
- Code: Select all
execute master..sqlbackup '-sql "BACKUP DATABASE [database name] TO DISK = ''C:\\Backups\\<AUTO>.sqb'' WITH CHECKSUM, THREADCOUNT = 3" '
(The disk location is surrounded by two sets of single quotes, whereas the BACKUP command is surrounded by one set of double quotes. The entire parameter is surrounded by one set of single quotes.)
There is more information about using the extended stored procedure here: http://www.red-gate.com/supportcenter/Content/SQL_Backup/help/7.1/SBU_UsingStoredProc
and examples of SQL Backup syntax here: http://www.red-gate.com/supportcenter/Content/SQL_Backup/help/7.1/SBU_Toolkit_syntax_egs
If this doesn't help, can you post the exact command you are using?