In certain situations, you may want to migrate a VDB to a new target environment. For example:
- When upgrading the host on which the VDB resides
- During a general data center migration
- To distribute the VDB load across target environments
This is easily accomplished by first disabling the database, then using the Migrate VDB feature to select a new target environment.
Prerequisites
- You must first disable the VDB before migrating it. Follow the steps outlined in Enabling and Disabling SQL Server VDBs.
- You must have already set up a new target environment that is compatible with the VDB that you want to migrate. Follow the steps outlined in Adding a SQL Server Standalone Target Environment.
Procedure
- Login to your Delphix Management application using Delphix Admin credentials.
- Click Manage.
- Select Datasets.
- Click the VDB you want to migrate.
- From the Actions menu (...) select Disable.
- Click Disable to confirm.
- From the Actions menu (...) select Migrate.
In the Migrate window select:
Environment: the new target environment for the VDB
User: select a user
Installation: the Installation where you want to migrate
Click Migrate to confirm your selections.
- From the Actions menu (...) select Enable.
- Click Enable to confirm.
Within a few minutes, your VDB will re-start in the new environment, and you can continue to work with it as you would with any other VDB.
Procedure via CLI
Select the source associated with the VDB.
delphix> source delphix source > select "vexample"
Disable the source.
delphix source "vexample"> disable delphix source "vexample" disable *> commit delphix source "vexample">
Select the source config associated with the source.
delphix source "vexample"> get config vexample delphix source "vexample"> /sourceconfig delphix sourceconfig > select "vexample" delphix sourceconfig "vexample">
Update the repository to the repository on the target environment for the migration.
Update the environment user associated with the source config.
delphix sourceconfig "vexample"> update delphix sourceconfig "vexample" update *> set repository="new target environment"/"MSSQL instance" delphix sourceconfig "vexample" update *> set environmentUser="new target environment"/"new target's user" delphix sourceconfig "vexample" update *> commit delphix sourceconfig "vexample">
Re-enable the source.
delphix> /source select vexample delphix source "vexample"> enable delphix source "vexample" enable *> commit delphix source "vexample">
Post-Requisites
- Enable the VDB following the steps outlined in Enabling and Disabling SQL Server VDBs.