Custom Script Considerations

Customer provided script will be invoked during Fleet Maintenance operations by passing a single argument absolute path to an input parameter file containing several parameters as key value pairs. This input parameter file (scriptInputFile.txt) is generated as part of the procedure activity and relevant DP variables are added to this file. These key value pair can be read from this file in the Pre and Post script and are intended to be used for maintenance operation being automated by the custom script. Input parameter file contains parameter values such as current oracle home, new oracle home etc.

Additionally, you can run Pre and Post scripts as normal by setting the RUN_PRE_SCRIPT_AS_ROOT=true and RUN_POST_SCRIPT_AS_ROOT=true flags respectively within the input_file. These flags are by default set to false and can be left out if not needed. These flags will only be honored if passed along with flags: CUSTOM_PRE_SCRIPTS_URN and CUSTOM_POST_SCRIPTS_URN respectively. The Pre and Post flags can be used for DEPLOY, UPDATE, ROLLBACK and CLEANUP Fleet Maintenance operations.

Note:

Do not edit Pre/Post hooks sections of Pre/Post script.

Sample input parameter file provided below:

Sample Code for CLEANUP_SOFTWARE

MAINTENANCE_PURPOSE=CLEANUP_SOFTWARE 
CUSTOM_PRE_SCRIPTS_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:74A730047930C5FDE053DF0FC40A3E69:0.1 
ORACLE_HOME_TARGET_DETAILS=abc01def.example.com:/scratch/cuser/app/cuser/product/13.4.1/dbhome_1; 
CUSTOM_POST_SCRIPTS_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:74A730047935C5FDE053DF0FC40A3E69:0.1 
DEPLOY_TYPE=SIDB 
ORACLE_HOME_NORMAL_CRED_NAME=CUSER:SYSMAN 
SOURCE_HOST=abc01def.example.com 
ORACLE_HOME_ROOT_CRED_NAME=ORACLE_ROOT:SYSMAN
RUN_PRE_SCRIPT_AS_ROOT=true

Sample Code for DEPLOY_DB_SOFTWARE

MAINTENANCE_PURPOSE=DEPLOY_DB_SOFTWARE 
SOURCE_HOME_LOCATION=/scratch/cuser/app/cuser/product/12.2.0/dbhome_2 
target_type=oracle_database 
target_name=sidb122
NOT_WINDOWS=true 
ORACLE_HOME_NORMAL_CREDSET_NAME=HostCredsNormal 
DISPATCHER_LOC=/tmp 
GOLD_IMAGE_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_OracleDB:74AA263BE602CF3BE053DF0FC40A2ED6:0.1 
ROOT_SCRIPT_LOC=/tmp/1311624666555972//MASSDB-194177ce43d441b89a504584d146aafb 
CUSTOM_PRE_SCRIPTS_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:74A730047930C5FDE053DF0FC40A3E69:0.1 
CUSTOM_POST_SCRIPTS_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:74A730047935C5FDE053DF0FC40A3E69:0.1 
ORACLE_HOME_TARGET_DETAILS=den01nre.example.com:OraDB12Home2_4_den01nre.example.com_3012; 
WORK_DIR_LOC=/tmp/1311624666555972//1311626758529303/ 
DEPLOY_TYPE=SIDB 
CREDSET_TARGET_TYPE=OracleHome 
ORACLE_HOME_ROOT_CREDSET_NAME=HostCredsPriv 
RUN_POST_SCRIPT_AS_ROOT=true
NEW_ORACLE_HOME_LIST=/scratch/cuser/app/cuser/product/13.4.1/dbhome_Dep2