Поделиться через


SchemaCompareScriptService.UpdateTargetDatabase - метод

Вызывается в окне Обновление инструмента скриптов Visual Studio Premium и Visual Studio Ultimate для обновления целевой базы данных с использованием предоставленного плана развертывания и других значений параметров.

Пространство имен:  Microsoft.Data.Schema.Tools.Compare.Schema
Сборка:  Microsoft.Data.Schema.Tools (в Microsoft.Data.Schema.Tools.dll)

Синтаксис

'Декларация
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
)

Параметры

Заметки

Это основной процесс метода UpdateTargetDatabase:

  1. Вызовите метод OnBeforeUpdateTargetDatabase.

  2. Вызовите CreateDeploymentController для получения диспетчера развертывания.

  3. Вызовите метод ISchemaDeploymentController.UpdateDatabase для контроллера развертывания.

  4. Запишите любые ошибки в значение параметра errorsAndWarnings.

  5. Вызовите метод OnAfterUpdateTargetDatabase.

  6. Наконец, вызовите метод RaiseSyncCompletedEvent.

Безопасность платформы .NET Framework

См. также

Ссылки

SchemaCompareScriptService Класс

Microsoft.Data.Schema.Tools.Compare.Schema - пространство имен

ModelComparisonResult

DataSchemaModel

SchemaDeploymentOptions

DeploymentPlan

ErrorManager

Другие ресурсы

Расширение функций баз данных в Visual Studio