CLI cookbook: provisioning a SQL server VDB
This topic describes how to provision a SQL Server VDB using the command line interface.
Prerequisites
You will need the following information:
The name of the VDB you want to create
The group in which to create the VDB
The SQL Server database name for the VDB
The source dSource or VDB from which you wish to provision
The semanticLocation, LSN, or timestamp of the point you want to provision from. You can run these commands to get the list of snapshots or timeflow ranges:
ACTIONSCRIPT3snapshot list database=dexamplesnapshot list timeflow=dexamplesnapshot list fromDate="2020-03-01T00:00:00.000Z" toDate="2020-03-04T11:31:27.883Z"
The target host on which you want to create the VDB. You can list the hosts with the
/host list
command.The source repository (SQL Server instance on the target host) in which to create the VDB. These can be listed with the
/repository list
command.
Procedure
Execute the
database provision
command.CODEdelphix> database provision
Execute the
defaults
command.CODEdelphix database provision> defaults
Set the timeflow point source timeflow and location.
CODEdelphix database provision defaults *> set type=TimeflowPointSemanticdelphix database provision defaults *> set container=dexampledelphix database provision defaults *> set location=LATEST_SNAPSHOT
Commit the operation to populate the defaults, as provided by the browser interface. At this point, the operation can be committed, though you will likely need to change the defaults to match the information.
CODEdelphix database provision defaults *> commit
Set the name and group for the new VDB.
CODEdelphix database provision *> set container.name=vexampledelphix database provision *> set container.group=""
Set the database name for the VDB on the target SQL Server instance.
CODEdelphix database provision *> set sourceConfig.databaseName=vexample
Set the target repository
CODEdelphix database provision *> set sourceConfig.repository=targetEnv/SQLServer2008
Commit the result.
CODEdelphix database provision *> commit