BackupDevices Collection

后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

The BackupDevices collection contains BackupDevice objects that expose the backup devices defined on a server running Microsoft SQL Server.

显示当前对象的 SQL-DMO 对象模型

Methods

Add Method

Remove Method (Collections)

Refresh Method

 

备注

SQL Server backup devices specify the behavior of specific backup media, usually tape. Backup devices are not required when issuing a BACKUP or RESTORE statement and are not required by the Backup object for its functioning.

With the BackupDevices collection, you can:

  • Create a new backup device definition for a server running SQL Server.
  • Remove a backup device definition.

For more information about creating backup devices, see BackupDevice Object.

To remove a backup device

  • Use the Remove method of the BackupDevices collection of a connected SQLServer object. Indicate the targeted backup device using the backup device name or the ordinal ___location in the collection, as in:

    oSQLServer.BackupDevices.Remove("Northwind_Tape")