DacServices.ExportBacpac Method (Stream, String, IEnumerable<Tuple>, Boolean)

Exports a package containing the schema and table data of a database.

Namespace:  Microsoft.SqlServer.Dac
Assembly:  Microsoft.SqlServer.Dac (in Microsoft.SqlServer.Dac.dll)

Syntax

'Declaration
Public Sub ExportBacpac ( _
    packageStream As Stream, _
    databaseName As String, _
    tables As IEnumerable(Of Tuple), _
    cancellationToken As Boolean _
)
'Usage
Dim instance As DacServices
Dim packageStream As Stream
Dim databaseName As String
Dim tables As IEnumerable(Of Tuple)
Dim cancellationToken As Boolean

instance.ExportBacpac(packageStream, _
    databaseName, tables, cancellationToken)
public void ExportBacpac(
    Stream packageStream,
    string databaseName,
    IEnumerable<Tuple> tables,
    bool cancellationToken
)
public:
void ExportBacpac(
    Stream^ packageStream, 
    String^ databaseName, 
    IEnumerable<Tuple^>^ tables, 
    bool cancellationToken
)
member ExportBacpac : 
        packageStream:Stream * 
        databaseName:string * 
        tables:IEnumerable<Tuple> * 
        cancellationToken:bool -> unit 
public function ExportBacpac(
    packageStream : Stream, 
    databaseName : String, 
    tables : IEnumerable<Tuple>, 
    cancellationToken : boolean
)

Parameters

  • packageStream
    Type: System.IO.Stream
    The stream representing the existing unencrypted package.
  • databaseName
    Type: System.String
    The name of the source database.
  • cancellationToken
    Type: System.Boolean
    The notification that operations should be canceled.

See Also

Reference

DacServices Class

ExportBacpac Overload

Microsoft.SqlServer.Dac Namespace