共用方式為


BackupRestoreBase.DatabaseFiles 屬性

取得作業系統檔案,該檔案為備份或還原作業的目標。

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

語法

'宣告
Public ReadOnly Property DatabaseFiles As StringCollection 
    Get
'用途
Dim instance As BackupRestoreBase 
Dim value As StringCollection 

value = instance.DatabaseFiles
public StringCollection DatabaseFiles { get; }
public:
property StringCollection^ DatabaseFiles {
    StringCollection^ get ();
}
member DatabaseFiles : StringCollection
function get DatabaseFiles () : StringCollection

屬性值

型別:System.Collections.Specialized.StringCollection
StringCollection 系統物件值,列出目標檔案的名稱。預設不會指定這個值。

備註

只有當 Action 屬性設定為 Files 時,才需要使用 DatabaseFiles 屬性。 當 Action 屬性設定為 Files 時,您必須指定 DatabaseFileGroups 屬性或 DatabaseFiles 屬性的值,指出要備份或還原的檔案群組或檔案。

範例

備份及還原資料庫和交易記錄

請參閱

參考

BackupRestoreBase 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

RESTORE (Transact-SQL)

BACKUP (Transact-SQL)