CLI cookbook: changing an SAP ASE dSource's staging database

Prerequisites

In order to change an SAP ASE dSource's staging database, you need to know the name of the staging database and you need to disable the dSource.

Procedure

  1. To find the name of the staging database, hover the mouse over the "Staging Database" name on the dSource card in the GUI or issue the following command via the CLI (replacing "pubs2" with the name of the dSource and "delphix.acme.com" with the hostname of your Delphix Engine):

    Copy
    $ echo "/source; select pubs2; ls" | ssh admin@delphix.acme.com | grep staging
    SourcePassword: staging
    Source: dxpb91a7LJlwj933xvlPvd_pubs2
  2. Disable the dSource by either toggling the "Enable/Disable" toggle in the Delphix Management application or by using the CLI:

    Copy
    $ ssh admin@delphix.acme.com
    delphix > source
    delphix source > select pubs2
    delphix source 'pubs2' > disable
    delphix source 'pubs2' disable *
    > set type=SourceDisableParameters
    delphix source 'pubs2' disable *
    > commit

    Dispatched job JOB-365
    SOURCE_DISABLE job started for "pubs2".
    SOURCE_DISABLE job for "pubs2" completed successfully.
  3. Change the repository of the staging database to reside in the desired SAP ASE instance:

    Copy
    $ ssh admin@delphix.acme.com
    delphix> sourceconfig
    delphix sourceconfig> select dxpb91a7LJlwj933xvlPvd_pubs2
    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' > update
    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *
    > ls
    Properties
        type: ASESIConfig
        credentials: (unset)
        databaseName: dxpb91a7LJlwj933xvlPvd_pubs2
        environmentUser: nstacksolasetest/sybase
        linkingEnabled: false
        repository: nstacksolasetest/SRC_157_4K
        user: (unset)

    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *
    > set environmentUser=nstacksolasestg/sybase
    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *
    > set repository=nstacksolaseprod/SRC_157_4K
    NSTACK_16K
    RH68_ASE157_S1
    SQL2008R2
    SQL2012
    nstacksolasestg
    nstacksolasetest/SRC_157_4K

    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *
    > set repository=nstacksolasestg
    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *
    > commit
    Rapidly hit the "tab" key twice after typing "set repository=" to make the CLI present a list of available instances.
  4. Enable the dSource:

    Copy
    delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' > /source
    delphix source > select pubs2
    delphix source 'pubs2' > enable
    delphix source 'pubs2' enable *
    > set type=SourceEnableParameters
    delphix source 'pubs2' enable *
    > commit

    Dispatched job JOB-367
    SOURCE_ENABLE job started for "pubs2".
    SOURCE_ENABLE job for "pubs2" completed successfully.