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
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):
CODE$ echo "/source; select pubs2; ls" | ssh admin@delphix.acme.com | grep stagingSourcePassword: stagingSource: dxpb91a7LJlwj933xvlPvd_pubs2
Disable the dSource by either toggling the "Enable/Disable" toggle in the Delphix Management application or by using the CLI:
CODE$ ssh admin@delphix.acme.comdelphix> sourcedelphix source> select pubs2delphix source 'pubs2'> disabledelphix 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.
Change the repository of the staging database to reside in the desired SAP ASE instance:
CODE$ ssh admin@delphix.acme.comdelphix> sourceconfigdelphix sourceconfig> select dxpb91a7LJlwj933xvlPvd_pubs2delphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2'> updatedelphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *> lsProperties 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/sybasedelphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *> set repository=nstacksolaseprod/SRC_157_4K NSTACK_16K RH68_ASE157_S1SQL2008R2 SQL2012 nstacksolasestg nstacksolasetest/SRC_157_4Kdelphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2' update *> set repository=nstacksolasestgdelphix 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.
Enable the dSource:
CODEdelphix sourceconfig 'dxpb91a7LJlwj933xvlPvd_pubs2'> /sourcedelphix source> select pubs2delphix source 'pubs2'> enabledelphix 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.