Server.AttachDatabase 方法

定義

多載

AttachDatabase(String, StringCollection)

附加資料庫

public void AttachDatabase(string name, System.Collections.Specialized.StringCollection files);
member this.AttachDatabase : string * System.Collections.Specialized.StringCollection -> unit
Public Sub AttachDatabase (name As String, files As StringCollection)

參數

name
String

資料庫名稱

files
StringCollection

檔案清單

適用於

AttachDatabase(String, StringCollection, AttachOptions)

附加資料庫

public void AttachDatabase(string name, System.Collections.Specialized.StringCollection files, Microsoft.SqlServer.Management.Smo.AttachOptions attachOptions);
member this.AttachDatabase : string * System.Collections.Specialized.StringCollection * Microsoft.SqlServer.Management.Smo.AttachOptions -> unit
Public Sub AttachDatabase (name As String, files As StringCollection, attachOptions As AttachOptions)

參數

name
String

資料庫名稱

files
StringCollection

檔案清單

attachOptions
AttachOptions

附加資料庫時使用的選項

適用於

AttachDatabase(String, StringCollection, String)

附加資料庫

public void AttachDatabase(string name, System.Collections.Specialized.StringCollection files, string owner);
member this.AttachDatabase : string * System.Collections.Specialized.StringCollection * string -> unit
Public Sub AttachDatabase (name As String, files As StringCollection, owner As String)

參數

name
String

資料庫名稱

files
StringCollection

需附送檔案清單

owner
String

新業主姓名

適用於

AttachDatabase(String, StringCollection, String, AttachOptions)

附加資料庫

public void AttachDatabase(string name, System.Collections.Specialized.StringCollection files, string owner, Microsoft.SqlServer.Management.Smo.AttachOptions attachOptions);
member this.AttachDatabase : string * System.Collections.Specialized.StringCollection * string * Microsoft.SqlServer.Management.Smo.AttachOptions -> unit
Public Sub AttachDatabase (name As String, files As StringCollection, owner As String, attachOptions As AttachOptions)

參數

name
String

資料庫名稱

files
StringCollection

檔案清單

owner
String

新業主姓名

attachOptions
AttachOptions

附加資料庫時使用的選項

適用於