Pages

Recently Viewed

Saturday, March 2, 2013

UPLOAD LDT Files using shell script

Requirement is to migrate the configuration files (LDTs) across environments.
 
Resolution - FNDLOAD is Oracle provided utility to achieve this by passing certain inputs. The required inputs are
1)       DB credentials
2)       Respective LCT name
This is very commonly and frequently used utility in EBD development.
 
Through this post we are sharing a shell script which can exclude LCT name parameter knowledge for LDT migration.
 
# !/bin/sh
 
echo "Enter APPS password : "
stty -echo
read v_apps_schema
stty echo
 
for file in `ls *.ldt`
do
v_ext=`echo | cut -d "." -f2`
v_lct=`grep "patch/115/import/" $file | cut -d "@" -f2`
echo "File Name    :$file" 
echo "Control File :$v_lct"
FNDLOAD apps/$v_apps_schema 0 Y UPLOAD @$v_lct $file
if [ $? != 0 ];then
echo "ERROR - Failed while uploading $file" 
else
echo "Uploaded $file successfully " 
fi
done
 
  • Copy the above script and save this as Sandeep.sh
  • $Dos2unix Sandeep.sh
  • Place the source LDT files and Sandeep.sh
  • $sh Sandeep.sh
 

No comments:

Post a Comment