SQL Backup - 7.2

SQL Backup

The CONVERT command - SQL Backup

Use the CONVERT command with the SQL Backup -SQL parameter to convert SQL Backup backup files (.sqb) to Microsoft Tape Format (MTF) files (.bak) using the command line or extended stored procedure. You can use the native SQL Server RESTORE command to restore MTF files.

Alternatively, you can use the SQL Backup File Converter (either from the command line, or using the GUI application). This application can also convert SQL Backup v7 or v6 files to SQL Backup v5 files; both file types have extension .sqb. See SQL Backup File Converter for more information.

Note that if you convert a backup file that has been stored across a number of files (using FILECOUNT as detailed in The BACKUP command), an individual .bak file is created for each file. For example, if backup file BackUpA.sqb was split into three files, the following files are created when you convert the backup:

BackUpA_01.bak

BackUpA_02.bak

BackUpA_03.bak

You can then restore the MTF (.bak) format backups as a group of backup files.

Note that when using the extended stored procedure the parameter or set of parameters (such as -SQL) must be delimited by single quotes. Therefore, wherever a single quote is used for the arguments below, for the extended stored procedure you must use two single quotes so that SQL Server does not interpret it as a string delimiter. See Using the extended stored procedure for more information.

Syntax

CONVERT { 'physical_backup_device_name' } ] TO { 'physical_file_name' }
[ WITH
    [ [ , ] MAXDATABLOCK = { 65536 | 131072 | ... | 2097152 } ]
    [ [ , ] PASSWORD = { 'password' } ]
    [ [ , ] SINGLERESULTSET ]
]

Arguments

MAXDATABLOCK

Specifies the maximum size of data blocks to be used when SQL Backup stores backup data. Valid values are integers in multiples of 65536, up to a maximum value of 2097152. For example:

    MAXDATABLOCK = 655360

PASSWORD

Specifies the password to be used with encrypted SQL Backup backup files. The resulting MTF (.bak) format file will not be encrypted.

SINGLERESULTSET

Specifies that the results returned by the CONVERT command should be limited to just one result set. This may be useful if you want to manipulate results using a Transact-SQL script. Such scripts can only manipulate results when a single result set is returned. The CONVERT command will return two result sets by default unless you specify the SINGLERESULTSET keyword.

Example

This example converts the encrypted backup file pubs.sqb to a MTF format file.

SQLBackupC -SQL "CONVERT 'C:\Backups\pubs.sqb' TO 'C:\Backups\pubs.bak' WITH PASSWORD = 'MyPassword'"

See also

The BACKUP command

The RESTORE SQBHEADERONLY command

Using the command line

Using the extended stored procedure

The RESTORE command

Was this article helpful?

Search support
Forums
Visit the SQL Backup forum.

SQL Backup

all SQL products

all products