API/Python/Open-Source Solutions

Expand all | Collapse all

Help with Dsource CLI in Powershell

Jump to Best Answer
  • 1.  Help with Dsource CLI in Powershell

    Posted 03-19-2019 07:53:00 PM
    All,

       I have looked through the CLI cookbook, but it seems to be out of date.  I am trying to stand up a dsource via powershell using the following:
    1. Invoke-SSHCommand -SessionId 16 -Command "/database;
    2. link;
    3. set name=""Jefftest"";
    4. set group=""Jefftest"";
    5. set description=""TEST"";
    6. set linkData.type=MSSqlLinkData;
    7. set linkData.config=""DevTest"";
    8. set linkData.dbUser=""SVC-DPXSQL"";
    9. set linkData.dbCredentials.type=PasswordCredential;
    10. set linkData.dbCredentials.password=""Passwordhere"";
    11. set linkData.pptRepository=""/MSSQLSERVER"";
    12. set linkData.syncParameters.type=MSSqlExistingMostRecentBackupSyncParameters;
    13. set linkData.ingestionStrategy.type=DelphixManagedBackupIngestionStrategy;
    14. set linkData.sharedBackupLocations=""\\backups\"";
    15. commit;"


    I get the following error 
    Output     : {The following validation errors are present:, ,     linkData.syncParameters The field "{0}" is required., ...}
    ExitStatus : 1


    I have included what i think is needed on line 12.  Anyone have any ideas?

    Thanks.


  • 2.  RE: Help with Dsource CLI in Powershell

    Posted 03-19-2019 07:57:00 PM
    Hello Jeff,
                  Are you familiar with dxtoolkit, https://github.com/delphix/dxtoolkit ?

    DxToolkit script dx_ctl_dsource can help you create MSSQL dSources without any external development.

    -Regards
    Jatinder


  • 3.  RE: Help with Dsource CLI in Powershell
    Best Answer

    Posted 03-19-2019 08:02:00 PM
    Hello,

    I will file a documentation bug for this. There is already a low priority product bug for this. To get past this error you would need to fake a change like this:

    unset linkData.syncParameters;edit linkData.syncParameters; back

    Thanks,
      Neal



  • 4.  RE: Help with Dsource CLI in Powershell

    Posted 03-19-2019 08:50:00 PM
    That did the trick.  Thank you.  Is there a more up to data source of CLI example somewhere?  The examples are pretty far off in some cases.