ALTER TABLE by running a Custom Command on the Stat Central Agent that invokes a customer-managed script on the EBS application server via SSH.This behavior occurs because Stat Post‑Migration steps run as operating system commands under the Stat Central Agent execution context. That execution context is commonly non-interactive and may not load user profiles or environment variables needed for Oracle tools. As a result:
sqlplus may not be found (PATH not set / ORACLE_HOME not loaded)
EBS environment variables are not initialized (Apps environment not sourced)
the Central Agent host may not be the correct node to execute EBS-specific commands
interactive prompts (password prompts, host key prompts) cannot be answered, causing failure/hang
Using SSH to run the change on the EBS application server resolves these limitations because the script can explicitly source the EBS environment and run SQL*Plus in the correct runtime context.
In Stat, create or edit the Post‑Migration step:
ssh -n -o BatchMode=yes oracle@10.250.70.3 /home/oracle/pmstep/alter_tab.shWhy these options matter:
-n prevents the command from waiting on standard inputBatchMode=yes prevents interactive password/passphrase prompting (required for automation)
Place the script on the EBS app tier (example path shown below and make it executable: chmod +x /home/oracle/pmstep/alter_tab.sh
Example Script (EBS Server): alter_tab.sh (customer can adapt object names and environment file path):
#!/usr/bin/env bashset -euo pipefail# --- Source EBS Apps environment ---APPS_ENV=/u01/install/APPS/19.0.0/EBSDB_db.env
if [ ! -f "$APPS_ENV" ]; then echo "ERROR: Apps env not found: $APPS_ENV" exit 1fi
source "$APPS_ENV"
# --- Safety check: ensure sqlplus exists ---if ! command -v sqlplus >/dev/null 2>&1; then echo "ERROR: sqlplus not found after sourcing Apps env" echo "ORACLE_HOME=$ORACLE_HOME" exit 1fi
# --- Run SQL ---sqlplus -s APPS/APPS@EBSDB <<'EOF'whenever sqlerror exit 1alter table XXQUEST_TABLE add (AFTER_MIGR varchar2(20));commit;exitEOF
exit 0After the migration runs:
Table altered.Commit complete.