Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

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

SQL Server 2012

Deploys schema and import 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,
	Nullable<CancellationToken> cancellationToken
)

Parameters

package
Type: Microsoft.SqlServer.Dac.BacPackage
BacPackage containing schema to be deployed and data to be imported.
targetDatabaseName
Type: System.String
Name of the target database for deployment.
cancellationToken
Type: System.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.
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

CancellationToken

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.