Метод DacServices.Extract (String, 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 ( _
    packageFileName As String, _
    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 packageFileName As String 
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(packageFileName, databaseName, _
    applicationName, applicationVersion, _
    applicationDescription, tables, _
    extractOptions, cancellationToken)
public void Extract(
    string packageFileName,
    string databaseName,
    string applicationName,
    Version applicationVersion,
    string applicationDescription,
    IEnumerable<Tuple<string, string>> tables,
    DacExtractOptions extractOptions,
    Nullable<CancellationToken> cancellationToken
)
public:
void Extract(
    String^ packageFileName, 
    String^ databaseName, 
    String^ applicationName, 
    Version^ applicationVersion, 
    String^ applicationDescription, 
    IEnumerable<Tuple<String^, String^>^>^ tables, 
    DacExtractOptions^ extractOptions, 
    Nullable<CancellationToken> cancellationToken
)
member Extract : 
        packageFileName:string * 
        databaseName:string * 
        applicationName:string * 
        applicationVersion:Version * 
        applicationDescription:string * 
        tables:IEnumerable<Tuple<string, string>> * 
        extractOptions:DacExtractOptions * 
        cancellationToken:Nullable<CancellationToken> -> unit
public function Extract(
    packageFileName : String, 
    databaseName : String, 
    applicationName : String, 
    applicationVersion : Version, 
    applicationDescription : String, 
    tables : IEnumerable<Tuple<String, String>>, 
    extractOptions : DacExtractOptions, 
    cancellationToken : Nullable<CancellationToken>
)

Параметры

  • packageFileName
    Тип: System.String
    Path to the package file to be created.
  • 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 reference data should be stored. 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 reference data will be stored.

Исключения

Исключение Условие
ArgumentException

If applicationName is a null reference or empty string.

DacServicesException

If a problem occurs during package extraction.

OperationCanceledException

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

См. также

Справочник

DacServices Класс

Перегрузка Extract

Пространство имен Microsoft.SqlServer.Dac