Delphix Products

 View Only
  • 1.  API script to force delete SAP ASE VDB

    Posted 07-22-2020 05:31:00 PM
    Hi,

    How to use the force option in API script for Delete SAP ASE VDB?

    {
        "type": "DeleteParamaters",
         "force": "true"
    }​

    ------------------------------
    Abhinav Chandra
    Team Leader
    Accenture
    ------------------------------


  • 2.  RE: API script to force delete SAP ASE VDB

    Posted 07-23-2020 03:18:00 AM

    Hello Abhinav,

    To determine the input parameters for a force delete operation you can use 'setopt trace=true'.
    For example: (NOTE - this is for an Oracle VDB and not SAP ASE) 

    luke-5370 database 'CLI_VDB' delete *> set
    credential force type username
    luke-5370 database 'CLI_VDB' delete *> set force=
    false true
    luke-5370 database 'CLI_VDB' delete *> set force=true
    luke-5370 database 'CLI_VDB' delete *> setopt trace=true
    luke-5370 database 'CLI_VDB' delete *> commit
    === POST /resources/json/delphix/database/ORACLE_DB_CONTAINER-39/delete ===
    {
    "type": "OracleDeleteParameters",
    "force": true
    }

    If you then wish to use these parameters in your curl statement you can do so as follows:

    curl -s -X POST -k --data @- http://<Engine>/resources/json/delphix/database/ORACLE_DB_CONTAINER-XX/delete \
    -b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
    {
    "type": "OracleDeleteParameters",
    "force": true
    }
    EOF

    Please note, you need to use the VDB reference property (CONTAINER-XX) and not the name (TEST_VDB) so good practice would be to include code in your script to map the name to the reference.
    You will also need to authenticate first.

    I hope this is helpful. 



    ------------------------------
    Luke Moss
    Delphix Support
    Delphix
    ------------------------------



  • 3.  RE: API script to force delete SAP ASE VDB

    Posted 07-23-2020 07:19:00 AM
    Hi Luke,

    Yes i am passing container name and running after creating session and authentication, the problem is it is not taking the force option and everytime it is following the normal delete option.
    Below is the syntax which i am using for sybase DB.

    curl -s -X POST -k --data @- http://${DE}/resources/json/delphix/database/${database}/delete \
    -b cookies.txt -H "Content-Type: application/json" <<-EOF
    {
    "type": "DeleteParameters",
    "deleteParameters": {
    "type": "DeleteParameters",
    "force": "true"
    }
    }
    EOF

    Also i even tried with but not working, i tried almost all sort of combinations

    {
    "type": "DeleteParameters",
    "force": "true"
    }



    ------------------------------
    Abhinav Chandra
    Team Leader
    Accenture
    ------------------------------



  • 4.  RE: API script to force delete SAP ASE VDB
    Best Answer

    Posted 07-23-2020 08:38:00 AM
    Hello,

    We found that the force parameter is a boolean and should be unquoted like this:
    {
    "type": "DeleteParameters",
    "force": true
    }



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------