다음을 통해 공유


DacServices.Extract 메서드 (Stream, String, String, Version, String, IEnumerable<Tuple<String, String>>, DacExtractOptions, Nullable<CancellationToken>)

Extracts the schema from a database into a package.

네임스페이스:  Microsoft.SqlServer.Dac
어셈블리:  Microsoft.SqlServer.Dac(Microsoft.SqlServer.Dac.dll)

구문

‘선언
Public Sub Extract ( _
    packageStream As Stream, _
    databaseName As String, _
    applicationName As String, _
    applicationVersion As Version, _
    applicationDescription As String, _
    tables As IEnumerable(Of Tuple(Of String, String)), _
    extractOptions As DacExtractOptions, _
    cancellationToken As Nullable(Of CancellationToken) _
)
‘사용 방법
Dim instance As DacServices 
Dim packageStream As Stream 
Dim databaseName As String 
Dim applicationName As String 
Dim applicationVersion As Version 
Dim applicationDescription As String 
Dim tables As IEnumerable(Of Tuple(Of String, String))
Dim extractOptions As DacExtractOptions 
Dim cancellationToken As Nullable(Of CancellationToken)

instance.Extract(packageStream, databaseName, _
    applicationName, applicationVersion, _
    applicationDescription, tables, _
    extractOptions, cancellationToken)
public void Extract(
    Stream packageStream,
    string databaseName,
    string applicationName,
    Version applicationVersion,
    string applicationDescription,
    IEnumerable<Tuple<string, string>> tables,
    DacExtractOptions extractOptions,
    Nullable<CancellationToken> cancellationToken
)
public:
void Extract(
    Stream^ packageStream, 
    String^ databaseName, 
    String^ applicationName, 
    Version^ applicationVersion, 
    String^ applicationDescription, 
    IEnumerable<Tuple<String^, String^>^>^ tables, 
    DacExtractOptions^ extractOptions, 
    Nullable<CancellationToken> cancellationToken
)
member Extract : 
        packageStream:Stream * 
        databaseName:string * 
        applicationName:string * 
        applicationVersion:Version * 
        applicationDescription:string * 
        tables:IEnumerable<Tuple<string, string>> * 
        extractOptions:DacExtractOptions * 
        cancellationToken:Nullable<CancellationToken> -> unit
public function Extract(
    packageStream : Stream, 
    databaseName : String, 
    applicationName : String, 
    applicationVersion : Version, 
    applicationDescription : String, 
    tables : IEnumerable<Tuple<String, String>>, 
    extractOptions : DacExtractOptions, 
    cancellationToken : Nullable<CancellationToken>
)

매개 변수

  • databaseName
    유형: System.String
    Name of the source database.
  • applicationName
    유형: System.String
    String identifier for the DAC application.
  • applicationVersion
    유형: System.Version
    Version of the DAC application.
  • applicationDescription
    유형: System.String
    Optional string summary of the DAC application.
  • tables
    유형: System.Collections.Generic.IEnumerable<Tuple<String, String>>
    Optional enumerable used to retrieve enumerator over set of tables for which data should be exported. For each Tuple in the enumeration the first item specifies the schema of the table, and the second specifies the base identifier of the table. If the value for this parameter is a null reference, no data will be exported.

예외

예외 조건
ArgumentException

If applicationName is a null reference or empty string.

DacServicesException

If a problem occurs during package extraction; or the supplied stream is not suitable for writing the package.

OperationCanceledException

If the CancellationToken has a cancellation requested and the operation could be cancelled.

참고 항목

참조

DacServices 클래스

Extract 오버로드

Microsoft.SqlServer.Dac 네임스페이스