How to restore database using sqb files in SQL SERVER

前端 未结 4 615
北恋
北恋 2021-02-01 04:19

I have a file with sqb extension(e.g: clark.sqb),how should i to restore database using the sqb file.thanks!

4条回答
  •  离开以前
    2021-02-01 04:47

    SQB files are a SQL Server backup format created by Red Gate's SQL Backup Pro software.

    As mentioned in Nick Sturgess' answer, there are command line and GUI tools available for converting SQB files into regular SQL Server backup files that can then be restored normally.

    Additionally, if you have SQL Backup Pro's server components installed on your SQL Server, you can restore a database from SQB files directly using a stored procedure call like the following:

    EXEC master..sqlbackup '-sql "RESTORE DATABASE [MyDatabase] FROM DISK = [C:\backups\*.sqb] LATEST_ALL WITH RECOVERY"'
    

    That command will restore the latest possible backup of the MyDatabase database from all of the SQB files in C:\backups\. So, if you have a handful of full backups, differential backups, and transactional backups all kept in C:\backups, this command will automatically calculate the latest backup that can be restored without you having to select the correct files manually and without having to convert the SQB files to another format.

    There are a number of different options that can be used to restore your database from SQB files directly, including:

    • Restoring to a database with a different name than that of the database in the backup
    • Relocating where the MDF and LDF files should be stored (useful if the server you're restoring to is different from the server where the backup was taken)

    All of these options (and more) are outlined on Red Gate's syntax example page.

提交回复
热议问题