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 Delphix.
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
Select the source associated with the VDB and disable the VDB.
delphix> source"vexample"delphix source'vexample'> disabledelphix source'vexample' disable *> commitSelect the source config associated with the source.
delphix source"vexample"> get configvexampledelphix source"vexample"> /sourceconfig"vexample"delphix sourceconfig"vexample">Update the databaseName to the new name.
delphix sourceconfig"vexample"> updatedelphix sourceconfig"vexample"update *> set databaseName=newDBNamedelphix sourceconfig"vexample"update *> commitdelphix sourceconfig"vexample">cdEnable the VDB.
delphix> source"vexample"delphix source'vexample'> enabledelphix source'vexample' enable *> commit