How To Capture Oracle Error In Shell Script
Contents |
here for a quick
Whenever Sqlerror Exit Sql.sqlcode Shell Script
overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this sqlplus error codes site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. Search Forums Show Threads Show Posts
Sqlplus Exit Code
Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to whenever oserror Page... linux operating commands and unix operating commands Capture Oracle return code in shell script Shell Programming and Scripting sqlplus exception handling Thread Tools Search this Thread Display Modes #1 05-19-2006 Vikas Sood Registered User Join Date: May 2006 Last Activity: 6 December 2006, http://stackoverflow.com/questions/14734131/managing-error-handling-while-running-sqlplus-from-shell-scripts 4:01 PM EST Posts: 32 Thanks: 0 Thanked 0 Times in 0 Posts Capture Oracle return code in shell script I am using the following code in my shell script list=`sqlplus -s $user/$pwd@$dbms<
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a https://www.experts-exchange.com/questions/22823070/how-to-capture-oracle-errors-in-unix-script.html Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website http://oracle.ittoolbox.com/groups/technical-functional/oracle-db-l/how-to-capture-plsql-stored-proc-errors-in-shell-script-3495072 Testing Store Headlines Experts Exchange > Questions > how to capture oracle errors in unix script Want to Advertise Here? Solved how to capture oracle errors in unix script Posted shell script on 2007-09-12 Oracle Database Unix OS 1 Verified Solution 10 Comments 2,952 Views Last Modified: 2013-12-19 I have a unix script that has some oracle statemets in it. I am truncating an oracle table and I would like to check for an error if the truncate file. How do I check if the trucate file in the script? I would in shell script like to send an error message to an email that the truncate file. Also I am backing up a table in unix and need to check if it fail so I can send an email message. see how I am doing it in the script below. ${ORACLE_HOME}/bin/sqlplus -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s ${DBLOGIN} <<-EOF SET HEADING OFF FEEDBACK OFF VERIFY OFF PAGESIZE 0 LINESIZE 120 SERVEROUTPUT ON SIZE 1000000 TRUNCATE TABLE SUNCOM_CUSTOM_STAGING; EOF ${ORACLE_HOME}/bin/sqlplus -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s -s ${DBLOGIN} <<-EOF SET HEADING OFF FEEDBACK OFF VERIFY OFF PAGESIZE 0 LINESIZE 120 SERVEROUTPUT ON SIZE 1000000 INSERT INTO CUSTOM_ACCTS_BACKUP SELECT * FROM CUSTOM_ACCTS; EOF 0 Question by:TClevel Facebook Twitter LinkedIn Google LVL 34 Active today Best Solution byjohnsone Actually, SQL*Plus can capture the error an return it to the OS. I would also get rid of all the -s parameters. While a noble attempt to h
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft Project and Portfolio Management SAP SCM Security Siebel Storage UNIX Visual Basic Web Design and Development Windows < Back CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant DACREE MarkDeVries MacProTX Inside-ERP VoIP_News Inside-CRM I_am_the_dragon maxwellarnold Michael Meyers-Jouan TerryCurran Chris_Day Ramnath.Awate JoeTorre Andrew.S.Baker Locutus bracke Dennis Stevenson Craig Borysowich Richard DukeGanote mircea_luca iudithm Nikki Klein Clinton Jones AbhaiTripathi knowscognosdoi Iqbalyk bluesguyAZ59 blrvenkat COMPANIES HP, Voltage Security and ... Hitachi America, LTD Arbor Networks, Inc. Quest Software View All Topics View All Members View All Companies Toolbox for IT Topics Oracle Groups Ask a New Question Oracle Database This group is where peers share technical expertise, solve problems, and discuss issues related to the use of Oracle Databases, including Oracle Grid. Home | Invite Peers | More Oracle Groups Your account is ready. You're now being signed in. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. How to capture PL/SQL stored proc errors in shell script Chaitanya Shaik asked May 11, 2010 | Replies (6) I am running a shell script which runs a sql which has 2 exec statements to run two stored procs in a package. if the PL/SQL has any error then the shell script should mail that error to group. I have been successful in sending the error mail but it goes to the same loop even though error is not there and ia mailing the