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 stagingSource Password: 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.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.
Change the repository of the staging database to reside in the desired SAP ASE instance:
CODE$ 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
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'> /sourced elphix 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.