高密度板的优缺点 污染:SQLBackupRestore

来源:百度文库 编辑:九乡新闻网 时间:2024/05/03 07:47:07
When SQL Server performs a backup, it generates the backup data in the Microsoft Tape Format (MTF), and stores it to disk or tape.



When third party backup applications are used, SQL Server generates the exact same data, only this time it passes it to the backup application instead of writing it out to disk or tape itself.



The backup data that is generated is identical in both cases. The only difference is that it may be compressed and/or encrypted in the version that's generated by the backup application.

The Virtual Device Interface, or VDI, is what third party backup applications use to communicate with SQL Server. At the time of writing, only Hyperbac uses a different technology.

The VDI is a set of COM interfaces that comes installed with SQL Server. You can download the VDI SDK from this link. Here's an outline of what goes on between a backup application and SQL Server, using VDI, during a backup:


And here's what's happening during a restore:



That's all there is to it. No kidding. I know what you're thinking, you're thinking 'Hey, that isn't rocket science. I could do that.'. And you'll be right. Cause the VDI SDK includes a complete demo (in C) that shows you how to perform backups and restores using the VDI! Now, all you need to do is to plug in your favourite compression algorithm in there ...

So, now that you know how the VDI works, the following should be clear:

· SQL Server provides the backup data. The backup applications simply process the data whichever way they want to.  
· SQL Server performs the restore i.e. creates the necessary data and log files for a new database, places the backup data in the right places etc. The backup applications simply provide the backup data.  
· The backup applications can usually convert a backup file from their proprietary format to the MTF format, so that it can be restored using regular SQL Server restore syntax.  
· The backup applications should be able to support all backup and restore options provided by SQL Server. They simply need to include the appropriate options with the BACKUP or RESTORE command that is sent to SQL Server.