Redhat linux [message #511887] |
Wed, 15 June 2011 14:25 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
My wait command doest wait for the previous process.Any idea what option i need to use with wait command,so that it wait till my sqlplus session ends.
sqlplus -s <<EOF1>> $sqlout.OUT 2>&1
$USER/$PASS
--@generateSQLfiles.sql
exit
EOF1
#-----------
wait
if [ ! -f *.SQL ]; then
echo "NO SQL files generated"
exit 0
fi
|
|
|
|
|
Re: Redhat linux [message #511890 is a reply to message #511889] |
Wed, 15 June 2011 14:34 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
my "if" condition should run only after sqlplus session exit.
now it goes to "if" condition before sqlplus session completes.
|
|
|
Re: Redhat linux [message #511891 is a reply to message #511890] |
Wed, 15 June 2011 14:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/61988.jpg) |
LKBrwn_DBA
Messages: 487 Registered: July 2003 Location: WPB, FL
|
Senior Member |
|
|
gkrishn wrote on Wed, 15 June 2011 15:34my "if" condition should run only after sqlplus session exit.
now it goes to "if" condition before sqlplus session completes.
Not true...the sqlplus session completes before the rest of the scripts executes.
Remove the silent (-s) option from sqlplus and check the contents of the $sqlout.OUT file.
[Updated on: Wed, 15 June 2011 14:58] by Moderator Report message to a moderator
|
|
|
Re: Redhat linux [message #511892 is a reply to message #511890] |
Wed, 15 June 2011 14:40 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
my sqlplus session generates many .SQL files for each "VIEWS" in my database.
"if" condition is added to check if any .SQL files are generated or not. Thanks Mahesh
|
|
|