Skip to main content
Skip table of contents

Renaming a SQL Server VDB via CLI

This topic describes how to change the database name on the SQL Server Instance for VDB through the Delphix CLI.

Database name on SQL Server vs. VDB name on Delphix

The database name is what you would see the SQL Server instance on the Target in SQL Server Management Studio or sys.databases. It is also the database name in the Configuration tab in Delphix.

The name of the VDB is an internal name within Delphix Engine and does not need to be the same as the database name on Target. This is found on the Status tab of Delphx.

Prerequisites

  • The VDB must be running on the target environment.

  • The SQL Server instance on the target environment where the VDB is located must be up and reachable.

Procedure

  1. Select the source associated with the VDB and disable the VDB.

    delphix> source "vexample"
    delphix source 'vexample'> disable
    delphix source 'vexample' disable *> commit

  2. Select the source config associated with the source.

    delphix source "vexample" > get config
      vexample
    delphix source "vexample" > /sourceconfig "vexample"
    delphix sourceconfig "vexample" >

  3. Update the databaseName to the new name.

    delphix sourceconfig "vexample" > update
    delphix sourceconfig "vexample" update *> set databaseName=newDBName
    delphix sourceconfig "vexample"   update *> commit
    delphix sourceconfig "vexample" >cd

  4. Enable the VDB.

    delphix> source  "vexample"
    delphix source  'vexample'> enable
    delphix source  'vexample' enable *> commit


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.