Freigeben über


Server.AttachDatabase Method

Definition

Overloads

AttachDatabase(String, StringCollection)

Attach Database

AttachDatabase(String, StringCollection, AttachOptions)

Attach Database

AttachDatabase(String, StringCollection, String)

Attach Database

AttachDatabase(String, StringCollection, String, AttachOptions)

Attach Database

AttachDatabase(String, StringCollection)

Attach Database

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)

Parameters

name
String

database name

files
StringCollection

file list

Applies to

AttachDatabase(String, StringCollection, AttachOptions)

Attach Database

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)

Parameters

name
String

database name

files
StringCollection

file list

attachOptions
AttachOptions

options used when attaching database

Applies to

AttachDatabase(String, StringCollection, String)

Attach Database

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)

Parameters

name
String

database name

files
StringCollection

list of files to attach

owner
String

new owner name

Applies to

AttachDatabase(String, StringCollection, String, AttachOptions)

Attach Database

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)

Parameters

name
String

database name

files
StringCollection

file list

owner
String

new owner name

attachOptions
AttachOptions

options used when attaching database

Applies to