Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Deploy Method

DacServices.Deploy Method (DacPackage, String, Boolean, DacDeployOptions, Nullable<CancellationToken>)

SQL Server 2014
 

Deploys the supplied package to a database.

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

public void Deploy(
	DacPackage package,
	string targetDatabaseName,
	bool upgradeExisting = false,
	DacDeployOptions options = null,
	Nullable<CancellationToken> cancellationToken = null
)

Parameters

package
Type: Microsoft.SqlServer.Dac.DacPackage

The DacPackage containing schema to be deployed.

targetDatabaseName
Type: System.String

The name of the target database for deployment.

upgradeExisting
Type: System.Boolean

true to allow modification of existing database schema in order to match schema contained in source package; false to block modification of existing database. If the database does not exist this flag has no effect.

options
Type: Microsoft.SqlServer.Dac.DacDeployOptions

The instance of DacDeployOptions that specifies properties that affect various aspects of the deployment.

cancellationToken
Type: System.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.

Exception Condition
ArgumentException

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

DacServicesException

upgradeExisting

OperationCanceledException
Return to top

Community Additions

ADD
Show:
© 2015 Microsoft