This topic describes the use of pre- and post-scripts with dSources.
For each script, you can add the script path and its arguments when linking a dSource in one of two ways. Either:
- During the Add dSource wizard process, in the Data Management screen, click Advanced.
or
- On the back of the dSource card, click the Pencil icon next to the Pre Script and Post Script fields.
To update pre- and post-script information:
- Flip over the dSource card.
- Click on the Pencil icon next to the Pre Script and Post Script fields.
- When finished, click the check mark icon.
Note that pre-scripts are executed before the SnapSync policy, and if the script fails, SnapSync will fail as well. In the case of a post-script, the script will execute after SnapSync is complete. If a post-script fails, you will see an error message.
Using Scripts with SAP ASE dSources
- For SAP ASE dSources, linking pre- and post-scripts are run on the environment of the linked dSource.
- Staging pre- and post-scripts are run on the staging environment
Available Variables for SAP ASE dSource Scripts
These environment variables are set by Delphix Engine for scripts running on a SAP ASE dSource or VDB:
Environment variable | Value |
---|
ASE_ENVUSER | Environment user executing the scripts |
ASE_DBUSER | SAP ASE user name |
ASE_DATABASE | SAP ASE database name |
ASE_INSTANCE | SAP ASE instance name |
ASE_PORT | SAP ASE instance port |
Specifying Arguments for SAP ASE Scripts
You can specify multiple arguments for a script. In the Pre or Post Script field, enter the path to the script, and then list the arguments. If the argument contains spaces, enclose it in single or double quotes. You can escape single quotes within the argument with a backslash.
An Example with Three Arguments
/opt/app/product/10.2.0.5/db_1/dbs/myscript.sh one "second argument in double quotes" 'third argument in single quotes'
|
An Example with an Apostrophe
/opt/app/product/10.2.0.5/db_1/dbs/myscript.sh 'I\'d rather be in Hawaii.'
|