Share via


SchemaCompareScriptService.UpdateTargetDatabase Method

Called by the Update Script Tool window of Visual Studio Premium and Visual Studio Ultimate to update the target database by using the provided deployment plan and the other parameter values.

Namespace:  Microsoft.Data.Schema.Tools.Compare.Schema
Assembly:  Microsoft.Data.Schema.Tools (in Microsoft.Data.Schema.Tools.dll)

Syntax

'Declaration
Public Overridable Sub UpdateTargetDatabase ( _
    comparisonResult As ModelComparisonResult, _
    source As DataSchemaModel, _
    target As DataSchemaModel, _
    options As SchemaDeploymentOptions, _
    plan As DeploymentPlan, _
    <OutAttribute> ByRef errorsAndWarnings As ErrorManager _
)
public virtual void UpdateTargetDatabase(
    ModelComparisonResult comparisonResult,
    DataSchemaModel source,
    DataSchemaModel target,
    SchemaDeploymentOptions options,
    DeploymentPlan plan,
    out ErrorManager errorsAndWarnings
)
public:
virtual void UpdateTargetDatabase(
    ModelComparisonResult^ comparisonResult, 
    DataSchemaModel^ source, 
    DataSchemaModel^ target, 
    SchemaDeploymentOptions^ options, 
    DeploymentPlan^ plan, 
    [OutAttribute] ErrorManager^% errorsAndWarnings
)
abstract UpdateTargetDatabase : 
        comparisonResult:ModelComparisonResult * 
        source:DataSchemaModel * 
        target:DataSchemaModel * 
        options:SchemaDeploymentOptions * 
        plan:DeploymentPlan * 
        errorsAndWarnings:ErrorManager byref -> unit 
override UpdateTargetDatabase : 
        comparisonResult:ModelComparisonResult * 
        source:DataSchemaModel * 
        target:DataSchemaModel * 
        options:SchemaDeploymentOptions * 
        plan:DeploymentPlan * 
        errorsAndWarnings:ErrorManager byref -> unit 
public function UpdateTargetDatabase(
    comparisonResult : ModelComparisonResult, 
    source : DataSchemaModel, 
    target : DataSchemaModel, 
    options : SchemaDeploymentOptions, 
    plan : DeploymentPlan, 
    errorsAndWarnings : ErrorManager
)

Parameters

Remarks

This is the basic process of the UpdateTargetDatabase method:

  1. Call the OnBeforeUpdateTargetDatabase method.

  2. Call the CreateDeploymentController to get your deployment manager.

  3. Call the ISchemaDeploymentController.UpdateDatabase method on your deployment controller.

  4. Record any errors in the errorsAndWarnings parameter value.

  5. Call the OnAfterUpdateTargetDatabase method.

  6. Finally, call the RaiseSyncCompletedEvent method.

.NET Framework Security

See Also

Reference

SchemaCompareScriptService Class

Microsoft.Data.Schema.Tools.Compare.Schema Namespace

ModelComparisonResult

DataSchemaModel

SchemaDeploymentOptions

DeploymentPlan

ErrorManager

Other Resources

Extending the Database Features of Visual Studio