Share via


BackupDevice Object

Questa funzionalità verrà rimossa in una delle prossime versioni di Microsoft SQL Server. Evitare di utilizzare questa funzionalità in un nuovo progetto di sviluppo e prevedere interventi di modifica nelle applicazioni in cui è attualmente implementata.

The BackupDevice object represents the properties of a Microsoft SQL Server backup device.

Modello di oggetti SQL-DMO in cui è visualizzato l'oggetto corrente

Properties

DeviceNumber Property

Status Property (BackupDevice)

Name Property

SystemObject Property

PhysicalLocation Property

Type Property (BackupDevice)

SkipTapeLabel Property

 

Methods

ReadBackupHeader Method (BackupDevice)

Remove Method (Objects)

ReadMediaHeader Method (BackupDevice)

Script Method (BackupDevice Object)

Osservazioni

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.

With the BackupDevice object, you can:

  • Define a new backup device for a server running SQL Server.
  • Change the definition of an existing SQL Server backup device.

The Name property of the BackupDevice object must match the definition of the sysname SQL Server data type.

To create a backup device

  1. Create a BackupDevice object.

  2. Set the Name property.

  3. Set properties that define the behavior or use of the device, such as the tape label skip parameter or the physical location.

  4. Add the BackupDevice object to the BackupDevices collection of a connected SQLServer object.