Skip to content

Create VDB

Create Session

curl -s -X POST -k --data @- http://$DELPHIX_ENGINE_IP/resources/json/delphix/session \
    -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "APISession",
    "version": {
        "type": "APIVersion",
        "major": $API_MAJOR,
        "minor": $API_MINOR,
        "micro": $API_MICRO
    }
}
EOF

Authenticate

curl -s -X POST -k --data @- http://$DELPHIX_ENGINE_IP/resources/json/delphix/login \
    -b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "LoginRequest",
    "username": "$DELPHIX_ADMIN_USER",
    "password": "$DELPHIX_ADMIN_PASSWORD"
}
EOF

Create VDB

result=$(curl -s -X POST -k --data @- http://$DELPHIX_ENGINE_IP/resources/json/delphix/database/provision -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type":"AppDataProvisionParameters",
    "container": {
        "type": "AppDataContainer",
        "name": "$DELPHIX_VDB_NAME",
        "group": "$DELPHIX_GROUP",
        "sourcingPolicy": {
            "type": "SourcingPolicy",
            "logsyncEnabled": false
        }
    },
    "source":{
        "operations":{
            "configureClone":[],
            "postRefresh":[],
            "postRollback":[],
            "postSnapshot":[],
            "preRefresh":[],
            "preRollback":[],
            "preSnapshot":[],
            "preStart":[],
            "postStart":[],
            "preStop":[],
            "postStop":[],
            "type":"VirtualSourceOperations"
        },
        "parameters": {
            "mountPath":"$DELPHIX_VDB_MOUNTPOINT",
            "pdbName":"",
            "tgtwalletpwd":"",
            "dbName":"$DELPHIX_VDB_NAME",
            "crs_home":"",
            "dbUniqName":"$DELPHIX_VDB_NAME",
            "instanceName":"$DELPHIX_VDB_NAME",
            "pitr":false,
            "restoreTime":"",
            "restorefromtape":false,
            "noarchivelogmode": false,
            "dbrmanbkploc":"",
            "advRACSettings":false,
            "additionalNodes":[],
            "advancedSettings":[
                {
                    "partialracstatus":false,
                    "enabledebugging":false
                }
                  ],
            "config_settings_prov":[
                {
                    "propertyName": "sga_max_size",
                    "value": "2500M"
                }, 
                {
                    "propertyName": "sga_target",
                    "value": "2200M"
                }
                  ],
            "custominitparamfile": "",
            "custom_env_variables": [   
                {
                    "propertyName": "ORACLE_UNQNAME", 
                    "value": "$DELPHIX_VDB_NAME"
                }               
            ]
        },
        "additionalMountPoints":[],
        "allowAutoVDBRestartOnHostReboot":false,
        "name":"$DELPHIX_VDB_NAME",
        "type":"AppDataVirtualSource"
    },
    "sourceConfig":{
        "name":"$DELPHIX_VDB_NAME",
        "repository":"$DELPHIX_REPOSITORY_REF",
        "linkingEnabled":true,
        "path":"",
        "environmentUser":"$DELPHIX_ENVUSER_REF",
        "parameters": {"dbUniqName":"${DELPHIX_VDB_NAME}","dbIdentityName":"$DELPHIX_VDB_NAME-${DELPHIX_VDB_NAME}","dbName":"$DELPHIX_VDB_NAME"},
        "type":"AppDataDirectSourceConfig"
    },
    "timeflowPointParameters": {
        "type": "TimeflowPointSemantic",
        "container": "$DELPHIX_CONTAINER_REF",
        "location": "LATEST_POINT"
    }
}
EOF
)

Note: - Update all UNIX variables in above snippet code as per your environment. - Above are list of parameters and its values will change as per dsource type. - Please refer VDB Parameters for list of parameters.