Home » Infrastructure » Unix » perform export timestamping my dumpfile while utilizing parameter (10.2.0.3.0 - 64bit solaris)
perform export timestamping my dumpfile while utilizing parameter [message #359074] Thu, 13 November 2008 11:59 Go to next message
lawlade
Messages: 59
Registered: May 2007
Location: LAUREL, MARYLAND
Member
I am new to shell scripting. I need to timestamp my dumpfile while utilizing a parameter embedded in a shell script. I have tried utilizing the following in my parameter file "$DATE" ,`$DATE` but neither work.

MY SHELL SCRIPT - pecoswebr_exp2.sh
#!/bin/ksh
cd /export/home/oracle
. ./.profile
echo pecoffd|. /oracle/product/10.2.0/bin/oraenv
cd /backup/pecoffd/exports/dump_dir/weekly_exports

export ORACLE_SID=pecoffd
export DATE=`date +%m%d%Y`

expdp parfile=/backup/pecoffd/exports/dump_dir/weekly_exports/expdppecoswebr2_wkly.par
MAILDBA="you@you.com"
if [[ -f /backup/pecoffd/exports/dump_dir/weekly_exports/pecoswebr_$DATE.log]]
then
errcnt=`grep ORA- /backup/pecoffd/exports/dump_dir/weekly_exports/pecoswebr_$DATE.log| wc -l`
if [[ ! $errcnt -eq 0 ]]
then
echo Errors occurred during the pecowebr Export on 41 ${DATE} | mailx -s "Errors Exporting PECOSWEBR refresh from condo50" ${MAILDBA} < /backup/pecoffd/exports/dump_dir/weekly_exports/pecoswebr_$DATE.log
else
echo PECOSWEBR Refresh Dumpfile Copying files now !!!!!! | mailx -s "PECOS refresh dumpfile is copying now"
${MAILDBA}
fi
fi
echo "the end...."
MY PARAMETER FILE - expdppecoswebr2_wkly.par
userid=system/passwd
dumpfile=pecoswebr_"$DATE".dmp
directory=wkly_dump_dir
schemas=pecoswebr
logfile=pecoswebr_"$DATE".log

MY ERROR OUTPUTORACLE_SID = [ddsd] ?
Export: Release 10.2.0.3.0 - 64bit Production on Thursday, 13 November, 2008 10:37:59

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39157: error appending extension to file "pecoswebr_"$DATE".log"
ORA-07225: sldext: translation error, unable to expand file name.
Additional information: 7217
pecoswebr_exp2.sh[13]: syntax error at line 15 : `then' unexpected


Re: perform export timestamping my dumpfile while utilizing parameter [message #359075 is a reply to message #359074] Thu, 13 November 2008 12:15 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Either you put the variable parameter outside the parameter file or you dynamically generate the parameter file inside the script.

Regards
Michel
Previous Topic: Passing Oracle Userid and Pass
Next Topic: Not getting proper format in email
Goto Forum:
  


Current Time: Thu Dec 08 23:51:37 CST 2016

Total time taken to generate the page: 0.05784 seconds