다음을 통해 공유


DacServices.ExportBacpac 메서드 (String, String, IEnumerable<Tuple<String, String>>, Nullable<CancellationToken>)

Extracts schema and export data from a database into a "bacpac" package.

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

구문

‘선언
Public Sub ExportBacpac ( _
    packageFileName As String, _
    databaseName As String, _
    tables As IEnumerable(Of Tuple(Of String, String)), _
    cancellationToken As Nullable(Of CancellationToken) _
)
‘사용 방법
Dim instance As DacServices 
Dim packageFileName As String 
Dim databaseName As String 
Dim tables As IEnumerable(Of Tuple(Of String, String))
Dim cancellationToken As Nullable(Of CancellationToken)

instance.ExportBacpac(packageFileName, _
    databaseName, tables, cancellationToken)
public void ExportBacpac(
    string packageFileName,
    string databaseName,
    IEnumerable<Tuple<string, string>> tables,
    Nullable<CancellationToken> cancellationToken
)
public:
void ExportBacpac(
    String^ packageFileName, 
    String^ databaseName, 
    IEnumerable<Tuple<String^, String^>^>^ tables, 
    Nullable<CancellationToken> cancellationToken
)
member ExportBacpac : 
        packageFileName:string * 
        databaseName:string * 
        tables:IEnumerable<Tuple<string, string>> * 
        cancellationToken:Nullable<CancellationToken> -> unit
public function ExportBacpac(
    packageFileName : String, 
    databaseName : String, 
    tables : IEnumerable<Tuple<String, String>>, 
    cancellationToken : Nullable<CancellationToken>
)

매개 변수

  • packageFileName
    유형: System.String
    Path of the target package file.
  • databaseName
    유형: System.String
    Name of the source database.
  • 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, data for all tables will be exported.

예외

예외 조건
ArgumentException

If the value for any of the required parameters is a null reference or an empty string.

DacServicesException

If an error occurs during schema deployment and data export; or if tables specifies a table that does not exist in the schema contained in the supplied package.

OperationCanceledException

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

참고 항목

참조

DacServices 클래스

ExportBacpac 오버로드

Microsoft.SqlServer.Dac 네임스페이스