Announcements

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

  Thread closed by the administrator. It is viewable, but not accepting new replies.
  • 1.  Tip of the Day: Using Scripts to Automatically Start and Stop VDBs

    Posted 07-08-2014 04:42:00 PM
    No replies, thread closed.

    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. 

    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1074079/32432-835lsl_inline.png?1404840946">

    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. 

    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1074080/17950-dkquqx_inline.png?1404840971">

    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.


    VDBStartup.ps1:

    Start-Sleep -s 120

    c:\Python33\python c:\Users\delphixtarget\Desktop\Delphix_VDB_Control.py -u delphix_admin -p delphix -s 192.168.0.100 -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.


    VDBShutdown.ps1:

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


    #vdb
    #delphix
    #automation
    #delphix_tip