It’s been a little while since I’ve posted… one of the things that I’ve been playing with lately is the E-Business Suite R12.2.10 VISION Appliance. For those that don’t know, you can download an actual Oracle VirtualBox VM image from E-Delivery with EBS R12.2.10 VISION, a 19c Database, and a configured operating system… See MOS 2717713.1 for the details.
Anyway, I was looking at this image and found a bit of code that they’re using to make changes to values in the context file. I’ve put it together in a simple script here:
#!#!/bin/bash
#
# Update Context File for EBS R12.1 or R12.2
#
# James J. Morrow
# BlueStone Solutions Group, Inc.
#
# 01-Nov-2023 JJM Updated to include R12.1 Syntax
#
export DTTM=`date +%Y%m%d-%H%M`
export CTXFILE=${1}
cp ${CTXFILE} ${CTXFILE}.${DTTM}
#
# Determine EBS Version from Environment
#
if [ "${FILE_EDITION}x" == "x" ]; then
echo -e "\nUsing syntax for EBS R12.1\n"
export VER="R12.1"
else
echo -e "\nUsing syntax for EBS R12.2\n"
export VER="R12.2"
fi
update_ctx()
{
#
# From EBS VISION VM, /u01/install/scripts/configwebentry.sh
#
if [ ${VER} == "R12.2" ]; then
#
# EBS R12.2.x syntax
#
echo -e "INFO: Setting ${TOKEN} to ${VALUE}"
${COMMON_TOP}/util/jdk32/jre/bin/java \
-classpath ${COMMON_TOP}/java/classes:${EBS_ORACLE_HOME}/shared-libs/ebs-appsborg/WEB-INF/lib/ebsAppsborgManifest.jar \
oracle.apps.ad.context.UpdateContext ${CTXFILE} ${TOKEN} "${VALUE}"
elif [ ${VER} == "R12.1" ]; then
#
# EBS R12.1.x Syntax
#
echo -e "INFO: Setting ${TOKEN} to ${VALUE}"
${COMMON_TOP}/util/jdk/jre/bin/java \
-classpath ${COMMON_TOP}/java/classes:${COMMON_TOP}/java/lib/appsborg2.zip \
oracle.apps.ad.context.UpdateContext ${CTXFILE} ${TOKEN} "${VALUE}"
fi
}
echo -e "\nUpdating CONTEXT_FILE\n"
export TOKEN=${2}
export VALUE="${3}"
update_ctx
#
# Show before/after
#
echo -e "\nDifference between ORIGINAL and UPDATED context files\n"
diff ${CTXFILE}.${DTTM} ${CTXFILE}
echo -e "\nOriginal context file backed up as ${CTXFILE}.${DTTM}\n"
The first argument is the context file you want to edit.
The second argument is the token you want to update (“s_dbSid”, for example)
The third is the value you want to assign that token (“TEST”, for example).
10-Nov-2023 – UPDATE: I’ve updated this post to include a version that should work on either the R12.1 or R12.2 appsTier.