Backup and restore examples illustrate performing common Microsoft® SQL Server™ database and log backup and restore operations by using SQL-DMO.
For SQL Server, backup operations can create a stable image of an entire database or some discrete part of the database. A backup can contain all data in a database or only that data modified since the last backup. Selection of a backup methodology is based on application implementation details, such as size of a database or transaction rate, and will vary from one SQL Server installation to another. For more information on selection of a backup strategy, see Backing Up and Restoring Databases.
Backup and restore operations performed by using the Backup and Restore objects can be long-running and can require user intervention to complete, such as changing the tape in a tape device. SQL-DMO implements events on the Backup and Restore objects allowing user notification of backup progress and signaling on exhaustion of media. For more information on using SQL-DMO Backup and Restore object events, see Handling SQL-DMO Events.