Mssql Provision

  • 0
  • 1
  • Question
  • Updated 5 months ago
  • Answered
Hi,

I am provisioning my Mssql dsource with the below API script:


"container": {
        "group": "GROUP-42",
        "name": "VD_20",
        "type": "MSSqlDatabaseContainer"
    },
    "recoveryModel": "SIMPLE",
    "source": {
        "type": "MSSqlVirtualSource",
        "allowAutoVDBRestartOnHostReboot": true
    },
    "sourceConfig": {
        "databaseName": "VD_20",
        "instance": {
            "host": "WINDOWS_HOST-26",
            "type": "MSSqlInstanceConfig"
        },
        "repository": "MSSQL_INSTANCE-2",
        "type": "MSSqlSIConfig"
    },
    "timeflowPointParameters": {
        "timeflow": "MSSQL-TIMEFLOW-1",
        "timestamp": "2018-02-19T04:31:39.000Z",
        "type": "MSSqlTimeflow"
        
  },
    "type": "MSSqlProvisionParameters"
}

after executing the code i am getting the below error:

{"type":"ErrorResult","status":"ERROR","error":{"type":"APIError","details":{"timeflowPointParameters":{"type":{"details":"Unexpected object type \"MSSqlTimeflow\". Expected \"TimeflowPointParameters\" or sub type.","action":null,"id":"exception.validation.object.type.unexpected","commandOutput":null,"diagnoses":null}}},"action":"Check your input parameters and try again.","id":"exception.validation.bad.input","commandOutput":null,"diagnoses":null}}

Regards,
Swathy
Photo of Swathy Sukumar

Swathy Sukumar

  • 866 Points 500 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,418 Points 10k badge 2x thumb
That section wants a Type of TimeFlowPointParameters. Look at http://<engine ip>/api/#TimeflowPointParameters for possible object types.
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,418 Points 10k badge 2x thumb
=== 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"

    }

}
(Edited)
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,682 Points 4k badge 2x thumb
Hi,

This is related to API parameters that aren't correct as per the documentation you have to use the following :

timeflowPointParameters:
        type: TimeflowPointTimestamp (*)
        timeflow: (required)
        timestamp: (required)

You have to change the value the parameter in bold on your code no "MSSqlTimeflow" in the API

Regards,

Mouhssine
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,418 Points 10k badge 2x thumb
Hi, I would recommend provisioning via the cli first. Then destroy and provision again, this time with tracing on to see the corresponding json. You turn tracing on in the cli with the following command: setopt trace=true.

I demonstrate that in this video:

https://vimeo.com/170187276 
Photo of Swathy Sukumar

Swathy Sukumar

  • 866 Points 500 badge 2x thumb
Thanks Adam and Mouhssine.

I have changed the property in the code as :

"timeflowPointParameters": {
        "type": "TimeflowPointSemantic",

        "container": "MSSQL_DB_CONTAINER-254"
        
  },

Regards,
Swathy