Export (0) Print
Expand All

DacServices.ImportBacpac Method (BacPackage, String, DacAzureDatabaseSpecification, Nullable<CancellationToken>)

Deploys schema and imports table data from the supplied package to a database.

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

public void ImportBacpac(
	BacPackage package,
	string targetDatabaseName,
	DacAzureDatabaseSpecification creationDefaults,
	Nullable<CancellationToken> cancellationToken
)

Parameters

package
Type: Microsoft.SqlServer.Dac.BacPackage
The BacPackage containing schema to be deployed and data to be imported.
targetDatabaseName
Type: String
The name of the target database for deployment.
creationDefaults
Type: Microsoft.SqlServer.Dac.DacAzureDatabaseSpecification
The optional default size and edition parameters used when creating a new Azure database.
cancellationToken
Type: Nullable<CancellationToken>
The 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.

ExceptionCondition
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 import.

OperationCanceledException

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

Community Additions

ADD
Show:
© 2014 Microsoft