BackupDeviceItem Class

The BackupDeviceItem object provides programmatic access to named SQL Server backup devices.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.Smo.BackupDeviceItem

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)

Syntax

'Declaration
Public Class BackupDeviceItem _
    Implements IComparable
'Usage
Dim instance As BackupDeviceItem
public class BackupDeviceItem : IComparable
public ref class BackupDeviceItem : IComparable
type BackupDeviceItem =  
    class 
        interface IComparable 
    end
public class BackupDeviceItem implements IComparable

The BackupDeviceItem type exposes the following members.

Constructors

  Name Description
Public method BackupDeviceItem() Initializes a new instance of the BackupDeviceItem class.
Public method BackupDeviceItem(String, DeviceType) Initializes a new instance of the [BackupDeviceItem] class that has the specified name and kind of device.

Top

Properties

  Name Description
Public property DeviceType Gets the kind of device for the BackupDeviceItem object.
Public property Name Gets the name of device for the BackupDeviceItem object.

Top

Methods

  Name Description
Public method CompareTo Verifies whether the specified object shares the same name as the referenced BackupDeviceItem object.
Public method Equals Determines whether the current object is the same as the specified object. (Overrides Object.Equals(Object).)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode Gets the hash code for the object. (Overrides Object.GetHashCode().)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Equality Determines whether two objects are equal by performing an equality operation on two BackupDeviceItem objects.
Public operatorStatic member GreaterThan Determines whether one object is greater than another by performing an operation on two BackupDeviceItem objects.
Public operatorStatic member Inequality Determines whether two objects are unequal by performing an inequality operation on two BackupDeviceItem objects.
Public operatorStatic member LessThan Determines whether one object is less than another by performing an operation on two BackupDeviceItem objects.

Top

Remarks

With the BackupDeviceItem object, you can do the following:

  • Access the backup device by name.

  • Verify whether two named backup devices are the same.

Examples

Backing Up and Restoring Databases and Transaction Logs

Thread Safety

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

See Also

Reference

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

BACKUP (Transact-SQL)