共用方式為


Restore.FileNumber 屬性

Gets or sets the index number used to identify the targeted backup set on the backup medium.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.SmoExtended (在 Microsoft.SqlServer.SmoExtended.dll 中)

語法

'宣告
Public Property FileNumber As Integer 
    Get 
    Set
'用途
Dim instance As Restore 
Dim value As Integer 

value = instance.FileNumber

instance.FileNumber = value
public int FileNumber { get; set; }
public:
property int FileNumber {
    int get ();
    void set (int value);
}
member FileNumber : int with get, set
function get FileNumber () : int 
function set FileNumber (value : int)

屬性值

型別:System.Int32
An Int32 value that specifies the backup set index number.

範例

The following code example demonstrates how to set the index number of the backup associated with the restore instance to 1.

VB

Dim rs As Restore
rs = New Restore
rs.FileNumber = 1

PowerShell

$rs = new-object Microsoft.SqlServer.Management.Smo.Restore
$rs.FileNumber = 1

請參閱

參考

Restore 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

RESTORE (Transact-SQL)

SQL Server 資料庫的備份與還原