This Microsoft® Visual C++® console sample demonstrates how to backup or restore the pubs sample database with snapshot by using the Virtual Device Interface feature of Microsoft SQL Server™ 2000. This sample extends the Osimple sample to handle the snapshot extensions. The ability to take or mount snapshots must be implemented before this sample is truly functional.
C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\Backup\Snapshot
Open snapshot.dsw in Microsoft® Visual C++® 6.0 and compile this program. Make sure to do the following before compiling:
To run the sample, open a Command Prompt window, and then change the current directory to where snapshot.exe is located. Run the program by entering "snapshot [b|r]".
The program requires one command line parameter. This parameter can be one of the following: