APIPythonOpen-Source Solutions

 View Only
Expand all | Collapse all

How to provision a MSSQL database through API in delphix?

  • 1.  How to provision a MSSQL database through API in delphix?

    Posted 02-14-2018 12:49:00 PM
    Delphix documentation provide a sample code to provision a Oracle database here:
    https://docs.delphix.com/display/DOCS43/API+Cookbook%3A+Example+Provision+Of+An+Oracle+VDB">https://docs.delphix.com/display/DOCS43/API+Cookbook%3A+Example+Provision+Of+An+Oracle+VDB">https://docs.delphix.com/display/DOCS43/API+Cookbook%3A+Example+Provision+Of+An+Oracle+VDB.

    While MSSQL db provisioning or any other DB provisioning might require other parameters.
    example mount base path/SID/DB unique name etc are required in Oracle
    while
    MSSQL might require Database Instance name in the Target Environment or recovery model etc.

    How to use one API call for any type of DB provisioning. If this is not possible then please share a sample API code for MSSQL provisioning.


    #dxToolkit
    #Virtualization


  • 2.  RE: How to provision a MSSQL database through API in delphix?
    Best Answer

    Posted 02-14-2018 12:57:00 PM
    Hi Ashul,

    We have many great example scripts that do this, in a few different languages. If you are a DBA and prefer perl, than I would suggest you take a look here:
    https://github.com/delphix/dxtoolkit

    If you are enterprise Architect, Automation Specialist, Developer, Tester, etc, then I would suggest you look at the python examples found here:

    https://github.com/CloudSurgeon/delphixpy-examples



  • 3.  RE: How to provision a MSSQL database through API in delphix?

    Posted 02-14-2018 01:18:00 PM
    Also, here is a blog and video I did a couple of years ago that walks you through how to do something in the Delphix web interface and map that to the CLI and the raw API calls. Give this a read/watch and let me know if it helps:
    http://www.adam.today/2016/06/working-with-delphix-python-module.html


  • 4.  RE: How to provision a MSSQL database through API in delphix?

    Posted 02-16-2018 02:01:00 PM
    Hello Anshul,
    Regarding the API, we have additional information in our latest online documentation Reference section.
    cli-cookbook-provisioning-a-sql-server-vdb

    If you go to the CLI Cookbook section, there are other SQL Server examples under the Source Databases and dSources section.

    The Web Service API Guide is also a good reference 

    You can also access API/CLI information specific to your Delphix version, via the delphix_admin GUI. Once logged in, navigate to Help > API Documentation



  • 5.  RE: How to provision a MSSQL database through API in delphix?

    Posted 02-19-2018 06:40:00 AM
    Hi Adam, I am unable to open these links due to company policy. Can you post a example similar to Oracle provisioning example given in documentation here">https://docs.delphix.com/docs/reference/web-service-api-guide/api-cookbook-common-tasks-workflows-and-examples/api-cookbook-example-provision-of-an-oracle-vdb">here?
    I will be using JAVA to call API.


  • 6.  RE: How to provision a MSSQL database through API in delphix?

    Posted 02-20-2018 06:06:00 AM
    I couldn't find API for provisioning of MSSQL db, only ORACLE is available in API documentation. For oracle, parameters like mount base is used, while there is no mount base in mssql db. So I wonder if API format is same or different for MSSQL. Can you provide curl command to provision MSSQL db? Thanks in advance.


  • 7.  RE: How to provision a MSSQL database through API in delphix?

    Posted 02-20-2018 06:07:00 AM
    Even CURL command for the same can help. :/


  • 8.  RE: How to provision a MSSQL database through API in delphix?
    Best Answer

    Posted 02-20-2018 07:30:00 AM
    Hi,

    May be you will find your "happiness" here https://github.com/duckback00/dxapikit/tree/master/API

    Regards,

    Mouhssine




  • 9.  RE: How to provision a MSSQL database through API in delphix?
    Best Answer

    Posted 02-20-2018 12:01:00 PM
    Here is an example I pulled from my environment this morning:
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ffffff; background-color: #2b66c9}span.s1 {font-variant-ligatures: no-common-ligatures}

    === POST /resources/json/delphix/database/provision ===

    {

        "type": "MSSqlProvisionParameters",

        "container": {

            "type": "MSSqlDatabaseContainer",

            "name": "MSSQLVDB",

            "group": "GROUP-35"

        },

        "source": {

            "type": "MSSqlVirtualSource",

            "allowAutoVDBRestartOnHostReboot": false

        },

        "sourceConfig": {

            "type": "MSSqlSIConfig",

            "repository": "MSSQL_INSTANCE-1",

            "databaseName": "MSSQLVDB"

        },

        "timeflowPointParameters": {

            "type": "TimeflowPointSemantic",

            "container": "MSSQL_DB_CONTAINER-1"

        }

    }


  • 10.  RE: How to provision a MSSQL database through API in delphix?

    Posted 02-27-2018 06:50:00 AM
    Thanks!


  • 11.  RE: How to provision a MSSQL database through API in delphix?
    Best Answer

    Posted 10-19-2018 04:36:00 PM
    Here is a script I run from PowerShell to provision a sql vdb (run from dxtoolkit/bin directory)

    perl dx_provision_vdb.pl -d <DelphixEngine> -group "<Group Name>" -sourcename <Data Source> -targetname <Name of new environment> -dbname <Database Name> -environment <Destination Environment> -type mssql -envinst MSSQLSERVER