SQL Backup - 6.5

SQL Backup

The RESTORE SQBHEADERONLY command

Use the RESTORE SQBHEADERONLY command with the SQL Backup -SQL parameter to retrieve the header information associated with a SQL Backup backup file.

Note that you can use wildcard characters for the location of the backups (physical_backup_device_name) to display the headers of multiple files.

For backup files that are compressed, using RESTORE SQBHEADERONLY to view header information is much quicker than using the equivalent SQL Server command, which necessarily requires that the entire backup file is uncompressed.

Syntax

Additional arguments and extended syntax are highlighted.

Restore a backup header

RESTORE SQBHEADERONLY
[ FROM { DISK } = { 'physical_backup_device_name' } ]
[ WITH
    [ [ , ] PASSWORD = { 'password' } ]
    [ [ , ] SINGLERESULTSET ]
]

Arguments

PASSWORD

Specifies the password to be used with encrypted backup files. If you are restoring multiple headers at the same time, the encrypted files must all have the same password.

SINGLERESULTSET

Specifies that the results returned by the RESTORE SQBHEADERONLY 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 RESTORE SQBHEADERONLY command will return two result sets by default unless you specify the SINGLERESULTSET keyword.

Examples

A. Restoring a header file

This example retrieves the header information for the pubs.sqb database backup file.

SQLBackupC -SQL "RESTORE SQBHEADERONLY FROM DISK = 'C:\Backups\pubs.sqb' "

B. Restoring multiple header files

This example retrieves the header information for all database backup files in the Backups folder.

SQLBackupC -SQL "RESTORE SQBHEADERONLY FROM DISK = 'C:\Backups\*.sqb' "

See also

Toolkit syntax examples

Using the command line

Toolkit parameters

The RESTORE command

Was this article helpful?

Search support
Forums
Visit the SQL Backup forum.

SQL Backup

all SQL products

all products