DacServices.ExportBacpac Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ExportBacpac(String, String, DacSchemaModelStorageType, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)
Extract schema and export data from a database into a "bacpac" package.
public void ExportBacpac (string packageFileName, string databaseName, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType, System.Collections.Generic.IEnumerable<Tuple<string,string>> tables = default, System.Threading.CancellationToken? cancellationToken = default);
member this.ExportBacpac : string * string * Microsoft.SqlServer.Dac.DacSchemaModelStorageType * seq<string * string> * Nullable<System.Threading.CancellationToken> -> unit
Public Sub ExportBacpac (packageFileName As String, databaseName As String, modelStorageType As DacSchemaModelStorageType, Optional tables As IEnumerable(Of Tuple(Of String, String)) = Nothing, Optional cancellationToken As Nullable(Of CancellationToken) = Nothing)
Parameters
- packageFileName
- String
Path of the target package file.
- databaseName
- String
Name of the source database.
- modelStorageType
- DacSchemaModelStorageType
Specifies the type of backing storage for a schema model.
- tables
- 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.
- cancellationToken
- Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
Exceptions
If the value for any of the required parameters is a null reference or an empty string.
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.
If the CancellationToken has a cancellation requested and the operation could be cancelled.
Applies to
ExportBacpac(String, String, DacExportOptions, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)
Extract schema and export data from a database into a "bacpac" package.
public void ExportBacpac (string packageFileName, string databaseName, Microsoft.SqlServer.Dac.DacExportOptions options, System.Collections.Generic.IEnumerable<Tuple<string,string>> tables, System.Threading.CancellationToken? cancellationToken = default);
member this.ExportBacpac : string * string * Microsoft.SqlServer.Dac.DacExportOptions * seq<string * string> * Nullable<System.Threading.CancellationToken> -> unit
Public Sub ExportBacpac (packageFileName As String, databaseName As String, options As DacExportOptions, tables As IEnumerable(Of Tuple(Of String, String)), Optional cancellationToken As Nullable(Of CancellationToken) = Nothing)
Parameters
- packageFileName
- String
Path of the target package file.
- databaseName
- String
Name of the source database.
- options
- DacExportOptions
Instance of DacExportOptions that specifies properties that affect various aspects of the export.
- tables
- 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.
- cancellationToken
- Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
Exceptions
If the value for any of the required parameters is a null reference or an empty string.
If an error occurs during schema deployment and data export;
or if options
specifies a table that does not exist in the schema contained in the supplied package.
If the CancellationToken has a cancellation requested and the operation could be cancelled.
Applies to
ExportBacpac(Stream, String, DacSchemaModelStorageType, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)
Extract schema and export data from a database into a "bacpac" package.
public void ExportBacpac (System.IO.Stream packageStream, string databaseName, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType, System.Collections.Generic.IEnumerable<Tuple<string,string>> tables = default, System.Threading.CancellationToken? cancellationToken = default);
member this.ExportBacpac : System.IO.Stream * string * Microsoft.SqlServer.Dac.DacSchemaModelStorageType * seq<string * string> * Nullable<System.Threading.CancellationToken> -> unit
Public Sub ExportBacpac (packageStream As Stream, databaseName As String, modelStorageType As DacSchemaModelStorageType, Optional tables As IEnumerable(Of Tuple(Of String, String)) = Nothing, Optional cancellationToken As Nullable(Of CancellationToken) = Nothing)
Parameters
- databaseName
- String
Name of the source database.
- modelStorageType
- DacSchemaModelStorageType
Specifies the type of backing storage for a schema model.
- tables
- 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.
- cancellationToken
- Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
Exceptions
If the value for any of the required parameters is a null reference or an empty string.
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;
or the supplied stream is not suitable for writing the package.
If the CancellationToken has a cancellation requested and the operation could be cancelled.
Applies to
ExportBacpac(Stream, String, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)
Extract schema and export data from a database into a "bacpac" package.
public void ExportBacpac (System.IO.Stream packageStream, string databaseName, System.Collections.Generic.IEnumerable<Tuple<string,string>> tables = default, System.Threading.CancellationToken? cancellationToken = default);
member this.ExportBacpac : System.IO.Stream * string * seq<string * string> * Nullable<System.Threading.CancellationToken> -> unit
Public Sub ExportBacpac (packageStream As Stream, databaseName As String, Optional tables As IEnumerable(Of Tuple(Of String, String)) = Nothing, Optional cancellationToken As Nullable(Of CancellationToken) = Nothing)
Parameters
- databaseName
- String
Name of the source database.
- tables
- 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.
- cancellationToken
- Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
Exceptions
If the value for any of the required parameters is a null reference or an empty string.
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;
or the supplied stream is not suitable for writing the package.
If the CancellationToken has a cancellation requested and the operation could be cancelled.
Applies to
ExportBacpac(String, String, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)
Extract schema and export data from a database into a "bacpac" package.
public void ExportBacpac (string packageFileName, string databaseName, System.Collections.Generic.IEnumerable<Tuple<string,string>> tables = default, System.Threading.CancellationToken? cancellationToken = default);
member this.ExportBacpac : string * string * seq<string * string> * Nullable<System.Threading.CancellationToken> -> unit
Public Sub ExportBacpac (packageFileName As String, databaseName As String, Optional tables As IEnumerable(Of Tuple(Of String, String)) = Nothing, Optional cancellationToken As Nullable(Of CancellationToken) = Nothing)
Parameters
- packageFileName
- String
Path of the target package file.
- databaseName
- String
Name of the source database.
- tables
- 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.
- cancellationToken
- Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
Exceptions
If the value for any of the required parameters is a null reference or an empty string.
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.
If the CancellationToken has a cancellation requested and the operation could be cancelled.
Applies to
ExportBacpac(Stream, String, DacExportOptions, IEnumerable<Tuple<String,String>>, Nullable<CancellationToken>)
Extract schema and export data from a database into a "bacpac" package.
public void ExportBacpac (System.IO.Stream packageStream, string databaseName, Microsoft.SqlServer.Dac.DacExportOptions options, System.Collections.Generic.IEnumerable<Tuple<string,string>> tables, System.Threading.CancellationToken? cancellationToken = default);
member this.ExportBacpac : System.IO.Stream * string * Microsoft.SqlServer.Dac.DacExportOptions * seq<string * string> * Nullable<System.Threading.CancellationToken> -> unit
Public Sub ExportBacpac (packageStream As Stream, databaseName As String, options As DacExportOptions, tables As IEnumerable(Of Tuple(Of String, String)), Optional cancellationToken As Nullable(Of CancellationToken) = Nothing)
Parameters
- databaseName
- String
Name of the source database.
- options
- DacExportOptions
Optional instance of DacExportOptions that specifies properties that affect various aspects of the export.
- tables
- 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.
- cancellationToken
- Nullable<CancellationToken>
Optional CancellationToken that can be used to indicate that the operation should be cancelled. Use of this object does not guarantee that the operation will be cancelled.
Exceptions
If the value for any of the required parameters is a null reference or an empty string.
If an error occurs during schema deployment and data export;
or if options
specifies a table that does not exist in the schema contained in the supplied package.
If the CancellationToken has a cancellation requested and the operation could be cancelled.