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.


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 "" with the hostname of your Delphix Engine):

$ echo "/source; select pubs2; ls" | ssh | grep stagingSource
    stagingSource: dxpb91a7LJlwj933xvlPvd_pubs2

2. Disable the dSource by either toggling the "Enable/Disable" toggle in the Delphix Management application or by using the CLI:

$ ssh
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:

$ ssh
delphix> sourceconfig
delphix sourceconfig> select dxpb91a7LJlwj933xvlPvd_pubs2
delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2'> update
delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *> ls
    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                                           
delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *> set repository=nstacksolasestg
delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *> commit

Hint: Rapidly hit the "tab" key twice after typing "set repository=" to make the CLI present a list of available instances.

4. Enable the dSource:

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.