Tip of the Day: Using Scripts to Automatically Start and Stop VDBs

  • 1
  • Announcement
  • Updated 5 years ago
If your target host reboots, you can use these script implementations to automatically start (or stop) your VDBs.

Oracle environment:

The VDB Startup and Shutdown script needs to be placed in /etc/init.d directory.

Create a VDBRestart script and grant the execute permissions to “root” user.

Delay of 2 minutes is purposefully provided while executing the VDB startup option so that Delphix is able to communicate to the target server once it starts back up after the reboot. 

After creating the script under /etc/init.d directory, create soft links with “S”(start) and “K”(Kill) option for different run levels under /etc/rc.d directory to execute startup and shutdown script accordingly.

Ensure that Kill option is executed first (K01) and startup option is executed last (S99) so all server components (e.g. NFS) are up and running before starting the VDB. 

SQL Server:
In Windows environment, the scripts which need to be executed either when the server shuts down or when it comes up needs to be configured under Local Group Policy settings. 

Click Start and under “Search Programs and Files” key in “gpedit.msc”

It will open "Local Group Policy Editor" as shown below.

Expand Windows Settings and Highlight “Scripts (Startup/Shutdown) option.

VDB Startup Script:

Click Startup  Properties
Click “PowerShell Scripts” tab

Click Add and key in the complete path and script for starting VDB.

Click the option “Run Windows PowerShell scripts last” option while starting VDB.


Start-Sleep -s 120

c:\Python33\python c:\Users\delphixtarget\Desktop\Delphix_VDB_Control.py -u delphix_admin -p delphix -s -P 80 -v "Version 2.5" –start

VDB Stop Script:

Click Shutdown  Properties

Click “PowerShell Scripts” tab

Click Add and key in the complete path and script for stopping VDB.

Click the option “Run Windows PowerShell scripts first” option while stopping VDB.


c:\Python33\python c:\Users\delphixtarget\Desktop\Delphix_VDB_Control.py -u delphix_admin -p delphix -s -P 80 -v "Version 2.5" –stop

Photo of Delphix FAQs

Delphix FAQs, Official Rep

  • 4,000 Points 4k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Mark Hayter

Mark Hayter

  • 394 Points 250 badge 2x thumb
Hi, where does this Delphix_VDB_Control.py script come from?

So you have to install Python on your server and then create this .py file?

Is there a way to shutdown individual VDBs using this method?
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 21,126 Points 20k badge 2x thumb
Hi Mark, I believe that script is a script written by our PS staff. I am inquiring if I can make that publicly available, or not. 

But yes, in this case, you would install python in order to run the python-based scripts.

You could write a script and have it perform the shutdown of a single VDB, if you wanted to do so. You could do this via CLI or WebServices.

I am sure your customer success manager would be happy to arrange to have all of your questions answered and help you figure out how to tackle your problems. Send me an email at adam.bowen xATx delphix.com and I will connect you.

Here is some info to get started. 

Photo of Tad Martin

Tad Martin, Employee

  • 60 Points
Hi Mark

As Adam mentions above, the script referenced is normally provided through Delphix Professional Services.

For Delphix customers what I might recommend is inquiring about a Health Check for your current Delphix configuration.  This is a low/no cost engagement, normally targeted for 6 or more months after initial Delphix deployment, that you can discuss with your Customer Success Manager. The Health Check will provide a hands-on technical review of your current Delphix configuration by Professional Services, and the scripts could be delivered as part of that process.