Tip of the Day: Using the CLI to Provision a SQL Server VDB

  • 1
  • Announcement
  • Updated 2 years ago
Please note you will need the following information prior to provisioning a VDB
  • 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. 
  • 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:
1. Execute the database provision command
     delphix > ls
     delphix > database
     delphix database > provision
2. Execute the defaults command
     delphix database provision > defaults
3. Set the time flow point source timeflow and location
     delphix database provision defaults *> set type=TimeflowPointSemantic
     delphix database provision defaults *> set container=dexample
     delphix database provision defaults *> set location=LATEST_SNAPSHOT
4. 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.
     delphix database provision defaults *> commit
5. Set the name and group for the new VDB
     delphix database provision *> set container.name=vexample
     delphix database provision *> set container.group="New Group"
6. Set the database name for the VDB on the target SQL Server Instance.
     delphix database provision *> set sourceConfig.databaseName=vexample
7. Set the target host
     delphix database provision *> edit sourceConfig.instance
     delphix database provision sourceConfig.instance *> set host=targethost
     delphix database provision sourceConfig.instance *> back
8. Set the target repository 
     delphix database provision *> set souceConfig.repository=targetEnv/SQLServer2008
9. Commit the result.
     delphix database provision *> commit
Photo of Delphix FAQs

Delphix FAQs, Official Rep

  • 4,000 Points 4k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Meagan Howe

Meagan Howe

  • 220 Points 100 badge 2x thumb

what would be the parameters if you want to provision from a specific point in time instead of the Latest Snapshot?

Photo of Srish Sriram

Srish Sriram, Employee

  • 1,280 Points 1k badge 2x thumb
HI Meagan,

The procedure would generally be the same. However, step 3 would be slightly different in order to specify a time rather than a snapshot.

3. Set the time flow point source timeflow and location
    delphix database provision defaults *> set type=TimeflowPointEngineTime
    delphix database provision defaults *> set container=dexample 
    delphix database provision defaults *> set timestamp=2016-01-01T01:01:01.000Z

The timestamp should be in ISO 8601 extended format: "[yyyy]-[MM]-[dd]T[HH]:[mm]:[ss].[SSS]Z".

I hope that helps. If you have any questions, please feel free to let us know.

Thanks!

Srish Sriram
Photo of Jaclyn Schoof

Jaclyn Schoof, Community Manager

  • 5,092 Points 5k badge 2x thumb
separate question

Please reference the new conversation here: how to provision from a specific point in time
Photo of Mark Hayter

Mark Hayter

  • 766 Points 500 badge 2x thumb
Hi
I am trying this (and have done this before)

but when I'm in the defaults and type

 delphix database provision defaults *> set container=Genesis 

I get the message

No such propery 'container'

Has this changed?  I've provisioned this way in the past

looks like now I've got to set that first before setting the type
(Edited)
Photo of Jaclyn Schoof

Jaclyn Schoof, Community Manager

  • 5,092 Points 5k badge 2x thumb
Which version of Delphix are you using? 
Photo of Mark Hayter

Mark Hayter

  • 766 Points 500 badge 2x thumb
We are using 4.3.3.0
Photo of Jaclyn Schoof

Jaclyn Schoof, Community Manager

  • 5,092 Points 5k badge 2x thumb
Hi Mark,
The CLI is case sensitive, is genesis upper or lower case? also you can do a set container= and then tab to show your options
Photo of Jaclyn Schoof

Jaclyn Schoof, Community Manager

  • 5,092 Points 5k badge 2x thumb
separate problem

Please reference the new conversation here: Issue setting container in CLI