Oracle Error Code 0
your browser supports JavaScript, it provides settings that enable or disable JavaScript. When JavaScript is disabled, you can view only the content of the help topic, which follows this message.Return CodesWhen the Batch Client exits it returns a result code to the calling program based on the exit condition of the script. There are two possible scenarios based on the StopOnError setting.StopOnError = False (-S0)If StopOnError is false the return code indicates general success or failure.0 = success (no errors)-1 = failure (one or more errors occurred) StopOnError = True (-S1) When StopOnError is true the Batch Client exit when an error occurs and returns a code based on the following table. By default, StopOnError is set to True.The batch client returns the following result codes in the event of success or failure.CommandCommand CodeClassClass CodeReturn CodeSuccessN/AN/AN/A0General ErrorN/AN/AN/A-1Validation ErrorN/AN/AN/A1Parse ErrorN/AN/AN/A100Command Line ErrorN/AN/AN/A4Copy15Application11501Copy15Dimension21502Create1Application1101Create1Dimension2102Create1Member3103Create1Association10110Debug21N/AN/A2100Delete2Application1201Delete2Dimension2202Delete2Member3203Delete2Association10210Detach16Dimension21602Exclude3Member3303Execute4DataSynchronization4404Execute4Deploy5405Execute4DimensionSynchronization6406Execute4Import7407Execute4Redeploy9409Execute4Validate12412Exit5N/A0500Include6Dimension2602Include6Member3603Insert7Member3703Login8N/A0800Logout9N/A0900Move19Member31903Option20N/A02000Quit10N/A01000Remove11Dimension21102Remove11Member31103Rename18Member31803Set12N/A01200Share17Dimension21702Update13Application11301Update13DimensionAssociation81308Update13Dimension21302Update13Member31303Variable14N/A01400In a DOS batch file or Windows command file the error can be checked as follows: Call epma-batch-client.bat .\scripts\MyScript.txt IF ERRORLEVEL 0 goto ON_SUCCESS IF ERRORLEVEL 100 goto PARSE_ERROR If ERRORLEVEL 101 goto A
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in SQL Developer All PlacesDatabaseDatabase Application DevelopmentSQL Developer This discussion is archived 2 Replies Latest reply on Jan 3, 2011 9:50 AM by -K- SQL Developer connection https://docs.oracle.com/cd/E12825_01/epm.111/epma_batch_user/ch01s03.html error - vendor code 0 827342 Dec 29, 2010 5:07 PM Have just installed Oracle 10g Rel 2 db. Runs locally. When I try to open a connection that previously worked fine, getting the pop-up "An error was encountered performing the requested operation:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/18111517/sqlplus-always-returns-exit-code-0 Discuss the workings and policies of this 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 6.2 million programmers, just like you, helping oracle error each other. Join them; it only takes a minute: Sign up Sql*plus always returns exit code 0? up vote 8 down vote favorite 1 Whenever I run a sql script using Sql*plus and check for $?, I get 0 even when the script wasn't succesful. Example #$ sqlplus user/password@instance @script.sql SQL*Plus: Release 10.2.0.1.0 - Production on Wed oracle error code Aug 7 14:20:44 2013 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.8.0 - Production v$dataf-ile d, * ERROR at line 6: ORA-00933: SQL command not properly ended Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.8.0 - Production $ echo $? 0 $ I would like it to return a non-zero value when an error occurs. How can I achieve that ? oracle scripting sqlplus exit-code share|improve this question edited Jul 22 '15 at 17:52 asked Aug 7 '13 at 18:54 Tulains Córdova 1,3951721 add a comment| 2 Answers 2 active oldest votes up vote 15 down vote accepted You have to explicitly tell sqlplus to do that, in your script. Basically, there are two statements that you can use: WHENEVER SQLERROR EXIT SQL.SQLCODE WHENEVER OSERROR EXIT For example: WHENEVER SQLERROR EXIT SQL.SQLCODE begin SELECT COLUMN_D