BackupDevice Class

The BackupDevice object provides programmatic access to SQL Server backup devices.

命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
Public NotInheritable Class BackupDevice
    Inherits ScriptNameObjectBase
    Implements ICreatable, IDroppable, IScriptable
public sealed class BackupDevice : ScriptNameObjectBase, ICreatable, IDroppable, IScriptable
public ref class BackupDevice sealed : public ScriptNameObjectBase, ICreatable, IDroppable, IScriptable
public final class BackupDevice extends ScriptNameObjectBase implements ICreatable, IDroppable, 
    IScriptable
public final class BackupDevice extends ScriptNameObjectBase implements ICreatable, IDroppable, 
    IScriptable

備註

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 Microsoft SQL Server.

  • Change the definition of an existing Microsoft SQL Server backup device.

The BackupDeviceType property must match the definition of the sysnameSQL Server data type.

只有 Microsoft .NET Framework 2.0 版支援此命名空間、類別或成員。

To get BackupDevice object properties, users can be a member of the public fixed server role.

To set BackupDevice object properties, users must have BACKUP DATABASE or BACKUP LOG permissions on the database, or be a member of the db_owner and db_backupoperator fixed database role and the sysadmin fixed server role.

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
         Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase
          Microsoft.SqlServer.Management.Smo.BackupDevice

範例

How to: Back Up Databases and Transaction Logs in Visual Basic .NET

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

BackupDevice Members
Microsoft.SqlServer.Management.Smo Namespace

其他資源

在 SQL Server 中備份和還原資料庫
備份裝置