What is this Site!!

All about Real time requirements in Orale Stay Tune!!

Sunday, October 7, 2007



Passing values back to unix script from sqlplus

Sometimes while calling sql scripts from shell scripts, it is required that you find out thatwhether the scripts failed or not. This is more imperative if you have a dependency between jobs. following is an example of this.



write following code in sql script
set echo on
whenever sqlerror exit 1
whenever oserror exit 2
--your code--
exit 0
write following code in shell script to receive the value
--call sql script
ret_val=$?

now ret val will have value 0 if sql script did not fail and 1 or 2 otherwise


2 comments:

12345 said...

Nice blog, Thanks For Sharing this infromative article.
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Big Data and Hadoop Training In Hyderabad

Anonymous said...

Such a nice blog, I really like what you write in this blog, I also have some relevant Information about Best HR Training In Hyderabad | Hr training institute in Hyderabad! if you want more information.
Oracle Fusion HCM Online Training
Oracle Fusion Financials Online Training