Computing.Net > Forums > Linux > exit from plsql but stay in script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

exit from plsql but stay in script

Reply to Message Icon

Name: mtanim
Date: January 5, 2009 at 04:43:58 Pacific
OS: Windows XP
CPU/Ram: pentium 4, 2 GB RAM
Product: Intel / INTEL PENTIUM 4
Subcategory: Software Problems
Comment:

Hi,

I have some script which logs into sqlplus, execute some commands. After sql command execution, I want to execute remaining part of the script. but everytime at exit from sqlplus, it prompts bash/shell ( e.g bash-3.00$
). here is the code--
.........
sqlplus -s sys/admin as SYSDBA <<ENDOFSQL
create or replace directory dumpdir as '$pwd';
grant read,write on directory dumpdir to pms;
exit;
ENDOFSQL

if test $? -eq 0
then
cd $ORACLE_HOME/bin
expdp pms/pms123 directory=dumpdir dumpfile=$str1
else
echo "Error: the SQL Plus command failed. Error code: $?"
exit 1
fi
........
It never executes the lines below ENDOFSQL. any one have some idea for this issue?



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: exit from plsql but stay in script

Accesing files from fat32 hard disk in linux redhat 6.1. www.computing.net/answers/linux/accesing-files-from-fat32-hard-disk-in-linux-redhat-61/537.html

Running a script from SSH www.computing.net/answers/linux/running-a-script-from-ssh/11671.html

variable in AWK command in script www.computing.net/answers/linux/variable-in-awk-command-in-script/23501.html