Home » RDBMS Server » Backup & Recovery » Export with mknod failing (HP UNIX )
Export with mknod failing [message #381301] Fri, 16 January 2009 03:42 Go to next message
jayraj005
Messages: 6
Registered: January 2009
Location: Hyderabad
Junior Member
Export with mknod is failling. We are executing this using shell script. The script is working fine in other enviornments like linux etc but failling in hp-unix.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
EXP-00028: failed to open /stage/export/AWPROD.dmp for write
Export file: expdat.dmp >
EXP-00030: Unexpected End-Of-File encountered while reading input
EXP-00000: Export terminated unsuccessfully

Please suggest how to resolve the issue?

Thanks,
Jayraj
Re: Export with mknod failing [message #381306 is a reply to message #381301] Fri, 16 January 2009 04:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
Please suggest how to resolve the issue?

Without the code the only suggestion we can make is: fix the code.

Regards
Michel
Re: Export with mknod failing [message #381312 is a reply to message #381306] Fri, 16 January 2009 05:03 Go to previous messageGo to next message
jayraj005
Messages: 6
Registered: January 2009
Location: Hyderabad
Junior Member

usage: /home/ora/abc/ABC.env /home/export/ABC

Script is given below.

#!/bin/ksh
#
# Script: export.sh
#
# Description: Export database to specified location
#
#!/bin/ksh
#
# Script: export.sh
#
# Description: Export database to specified location
# Exporting full database


if [[ $# != 2 ]] ; then
print "Wrong number of arguements"
print "Usage: $0 [environment file] [path/base_dump_file_name]"
exit 1
fi

ENV_FILE=$1
DUMP_FILE=$2

if [[ ! -a ${ENV_FILE} ]]; then
print "Environment File ${ENV_FILE} does not exist."
exit -1
fi

. ${ENV_FILE}
export PATH=$PATH:/usr/contrib/bin:/usr/local/bin:/usr/ccs/bin:/usr/bin:/usr/sbin
LOG=${DUMP_FILE}.log
EXP_FILE=${DUMP_FILE}.DUMP
GZ_FILE=${EXP_FILE}.gz

EMAIL_TO=avin@xyz.com
EMAIL_FROM=avin@xyz.com

date > ${LOG}

printf "\n\n Exproting ...\n\n" >> ${LOG} 2>&1
rm -f ${EXP_DIR}/${EXP_FILE} >> ${LOG} 2>&1
mknod ${EXP_DIR}/${EXP_FILE} p >> ${LOG} 2>&1
STATUS=$?
if [[ ${STATUS} != 0 ]]; then
printf "\n\nCould not create named pipe file.\n\n" >> ${LOG} 2>&1
else
cat ${EXP_FILE} | gzip -c > ${GZ_FILE} &
exp userid=system/<pwd> file=${EXP_FILE} full=y direct=y recordlength=65535 STATISTICS=NONE >> ${LOG} 2>&1
STATUS=$?
sleep 5
rm ${EXP_FILE}
if [[ ${STATUS} != 0 ]]; then
printf "\n\nExport Failed \n\n" >> ${LOG} 2>&1
fi
fi

date >> ${LOG} 2>&1

CHECK_LOG=`grep "Export terminated successfully without warnings." ${LOG} | wc -l`

if [[ ${STATUS} != 0 || ${CHECK_LOG} != 1 ]]; then
mailx -s "Script $0 on `hostname` failed for $ENV_FILE and $DUMP_FILE" -r ${EMAIL_FROM} ${EMAIL_TO} < ${LOG}
exit -1
fi

exit 0
Re: Export with mknod failing [message #381326 is a reply to message #381312] Fri, 16 January 2009 06:32 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Maybe:
- you didn't call the script as it should be
- you don't have the privilege to create a pipe
- you don't have the privilege to write in a pipe
- you didn't set EXP_DIR variable
- ...
Previous Topic: How to take a fulldatabase backup in oracle 10g?
Next Topic: RMAN-06908 when using Tivoli on 10g Std Edition
Goto Forum:
  


Current Time: Mon Nov 25 08:44:39 CST 2024