Skip to main content

hostname Check

The hostname command "one of the most basic of the network administrative utilities" according to linfo.org. I use the command to check whether I am in the TEST or DEV environment to use the FNDLOAD function for copying customizations to the PROD environment. Basically I use a shell script to create the LDT files used for the FNDLOAD to copy paste from TEST to PROD. This ensures no user errors and is much faster using this script. I will go into the FNDLOAD in a future post.
So after playing around and googling I found the solution:
#!/bin/sh
#Creating concurrent and XML Pub reports LDT files

APPS_PWD=$1
APPL_NAME=$2

if [ "$APPS_PWD" = "" ]
then
echo "Usage: make_ldt_files.sh "
exit
fi;

hostname

if [ `hostname` = "TEST.ORG.COM" ]
then

echo "Downloading concurrent definition..."
FNDLOAD apps/$APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct ./APPL_CONC.ldt PROGRAM APPLICATION_SHORT_NAME=PLSO CONCURRENT_PROGRAM_NAME=$APPL_NAME

echo "Downloading xml data definitions ..."
FNDLOAD apps/$APPS_PWD 0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct ./APPL_XML.ldt XDO_DS_DEFINITIONS DATA_SOURCE_CODE=$APPL_NAME APPLICATION_SHORT_NAME=PLSO


echo "Done ..."

else
echo "Not TEST or DEV environment!!!!"
fi;
exit

This now checks that the environment is the TEST environment. If not it will not create the LDT files. This is basically because it happened that the DBS ran this script in PROD without the check and this then creates a LDT of all the customizations for the Application (APPLICATION_SHORT_NAME).

Comments

Popular posts from this blog

Cancel or abort adop session

ADOP is in my opinion still pretty half baked. This is a critical tool that just isn't as intuitive as the old adpatch was. However we move with the times and get the hang of the new way of doing things. Along the way you might want to abort or cancel a patching cycling. With the two file systems and db editioning this can be a bit more to manage. I have learnt the hard way so you need to use the full cleanup after aborting a session. adop phase=abort adop phase=cleanup cleanup_mode=full

Creating new WLS domain ends with exit code 255

Cloning the instance I ran into this weird error. Was not sure what to do but after learning my lesson I dug through the error logs after seeing this in the adcfgclone log file. START: Creating new WLS domain. Running /u03/APPLYES/YES/fs2/FMW_Home/oracle_common/bin/pasteConfig.sh -javaHome /u03/APPLYES/YES/fs2/EBSapps/comn/util/jdk64 -al /u03/APPLYES/YES/fs2/EBSapps/comn/clone/FMW/WLS/EBSdomain.jar -tdl /u03/APPLYES/YES/fs2/FMW_Home/user_projects/domains/EBS_domain_YES -tmw /u03/APPLYES/YES/fs2/FMW_Home -mpl /u03/APPLYES/YES/fs2/EBSapps/comn/clone/FMW/WLS/plan/moveplan.xml -ldl /u03/APPLYES/YES/fs2/inst/apps/YES_erpapyes/admin/log/clone/wlsT2PApply -silent true -debug true -domainAdminPassword /u03/APPLYES/YES/fs2/EBSapps/comn/clone/FMW/tempinfo.txt Script Executed in 1903 milliseconds, returning status 255 ERROR: Script failed, exit code 255 Dig a bit deeper into the log files cd /u03/APPLYES/YES/fs2/inst/apps/YES_erpapyes/admin/log/clone/wlsT2PApply cat CLONE2016-01-10_04-37-

Error during rapid clone on pasteBinary.sh, exit code 255

I needed to run a clone and was running into a really head scratcher. As is Oracle\'s way they sometimes enjoy giving us DBA's a bit of detective work to do. As usual I kept knocking my head into various brick walls instead of tracking back through the logs. Eventually I came up with the problem Start to configure the run filesystem. You can do a dualfs from AD-TXK Delta 7 but for now I just needed to get this up and running: perl adcfgclone.pl appsTier START: Creating FMW Home. Running /u03/APPLUAT/UAT/fs1/EBSapps/comn/clone/FMW/ pasteBinary.sh -javaHome /u03/APPLUAT/UAT/fs1/EBSapps/comn/util/jdk64 -al /u03/APPLUAT/UAT/fs1/EBSapps/comn/clone/FMW/FMW_Home.jar -tl /u03/APPLUAT/UAT/fs1/FMW_Home -invPtrLoc /etc/oraInst.loc -ldl /u03/APPLUAT/UAT/fs1/inst/apps/UAT_erpapp05/admin/log/clone/fmwT2PApply -silent true -debug true -executeSysPrereqs false Script Executed in 21933 milliseconds, returning status 255 ERROR: Script failed, exit code 255 Oracle has left me a cryptic