The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com



HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sqlplus: command not found Tlg13team HP-UX 4 01-24-2008 08:57 PM
Use sqlplus command Nel Shell Programming and Scripting 3 09-12-2006 01:22 AM
check for successfull telnet session sumguy UNIX for Dummies Questions & Answers 0 05-15-2006 01:27 PM
Detecting a successfull FTP connection beilstwh Shell Programming and Scripting 2 09-30-2005 09:53 AM
sqlplus and sh scripts (to_char command)) josecollantes UNIX for Advanced & Expert Users 4 09-06-2001 09:59 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
  #1 (permalink)  
Old 11-20-2007
plaban.rout plaban.rout is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 7
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.
  #2 (permalink)  
Old 11-20-2007
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 499
Can you show us the code you are trying to execute and better explain your circumstances ??
  #3 (permalink)  
Old 11-20-2007
plaban.rout plaban.rout is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 7
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 (permalink)  
Old 11-20-2007
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 499
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 (permalink)  
Old 11-20-2007
plaban.rout plaban.rout is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 7
Cameron,

That's Brilliant !!!!!!!!

Thanks a lot.

Cheers,
Plaban
  #6 (permalink)  
Old 11-20-2007
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 499
No problem - glad I was able to help.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0