![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sqlplus: command not found | Tlg13team | HP-UX | 4 | 01-24-2008 05:57 PM |
| Use sqlplus command | Nel | Shell Programming and Scripting | 3 | 09-11-2006 10:22 PM |
| check for successfull telnet session | sumguy | UNIX for Dummies Questions & Answers | 0 | 05-15-2006 10:27 AM |
| Detecting a successfull FTP connection | beilstwh | Shell Programming and Scripting | 2 | 09-30-2005 06:53 AM |
| sqlplus and sh scripts (to_char command)) | josecollantes | UNIX for Advanced & Expert Users | 4 | 09-06-2001 06:59 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to check sqlplus command is successfull or not in HP UX?
Hi All,
I am not able to check the output of sqlplus command if it fails. can any body please help me in this regard. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Can you show us the code you are trying to execute and better explain your circumstances ??
|
|
#3
|
|||
|
|||
|
sqlplus -s rcrp/rcrp<<EOF
update PRICE_CLASS_DET set PCD_VALUE=1 where PCD_ID=11313; commit; exit; EOF if [ $? != 0 ] then echo "The Tariff Group Revert Back to Residential Type Customer for Antillia is not completed." | mailx -s "A NTILLIA BOC ERROR $0" $MAILTO exit; fi The above if condition is not able to catch the error from sqlplus command. |
|
#4
|
||||
|
||||
|
Suggestion is somthing like the following:
. ${HOME}/.profile ...... sqlplus $ASQLUSER @$SQL_DEPOT/sqlplus_filename.sql ...... if [ Check-ERROR-Condition-of-SQL-Output-File ] then echo "The Tariff Group Revert Back to Residential Type Customer for Antillia is not completed." | mailx -s "A NTILLIA BOC ERROR $0" $MAILTO exit; fi = = = = = = = = = = = = = = = = = = = = = = In . ${HOME}/.profile $ASQLUSER=rcrp/rcrp = = = = = = = = = = = = = = = = = = = = = = In $SQL_DEPOT/sqlplus_filename.sql spool $SQL_DEPOT/LOGS/sqlplus_filename.log update PRICE_CLASS_DET set PCD_VALUE=1 where PCD_ID=11313; commit; = = = = = = = = = = = = = = = = = = = = = = Hope that the above is able to assist you. Also makes managing your sql and unix scripts a little easier too. Cheers, Cameron. |
|
#5
|
|||
|
|||
|
Cameron,
That's Brilliant !!!!!!!! Thanks a lot. Cheers, Plaban |
|
#6
|
||||
|
||||
|
No problem - glad I was able to help.
|
||||
| Google The UNIX and Linux Forums |