Sqlplus "start" show error on failure exit on success

Hi all,
I have made a "Windows Scripting Host" script that dynamically create a sql script for package compilation and run it with sqlplus.
Script code
set scan off
set define off
+@<package_path>+
show error
pause
exit
What I want is that when the package compilation success the script exit, but show errors, pause, exit when fails. Something like this
Script code
set scan off
set define off
+@<package_path>+
if fail then
show error
pause
end if
exit
I try to use "whenever sqlerror continue" but with no luck
Script code
set escchar @
set scan off
set define off
whenever sqlerror continue
+@C:\Progetti\Net@Siu\Database\SIUMETERING\STOREDS\PKSPEC\old\LET_GEST_ACQUISIZIONE_ESTESA_h.sql+
exit
show error
pause
exit
Thanks for your help
Massimo
Edited by: maxfid on 29-apr-2010 20.24
Edited by: maxfid on 30-apr-2010 14.39

Catching errors directly in sqlplus is tough. Hitting an error after setting "whenever sqlerror exit" and you are done for. No time to pause. You can set a flag on error via a bind variable that a calling program could use to determine what to do next:
SQL> var err_num number
SQL> exec :err_num:=9999
PL/SQL procedure successfully completed.
SQL> whenever sqlerror exit :err_num
SQL> select andy from dual;
select andy from dual
ERROR at line 1:
ORA-00904: "ANDY": invalid identifier
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Production
C:\Temp>echo %errorlevel%
9999But if all your scripts are doing are compiling source code then compilation warnings aren't errors anyway.
I've seen Laurent Schneider do some fancy things with catching compilation "errors" in this regard: {message:id=2732328}
If the end goal is to run a lot of scripts and stop when there is an error maybe after each script you could output (spool) a "show errors" to a file and then peek at it before moving onto the next script. If you don't see a "No errors." then pause.

Similar Messages

  • Community:: somtimes it works fine and sometimes it shows error.

    User is being given read access to a community but still it shows the error message ::The page does not exist or user does not have access to it::
    What exactly is happening is that for sometime it shows the community page and after a while it again starts showing error message and this cycle gets repeated ever since.
    I am unable to figure out what could be the possible cause of this unusual problem.
    Same thing is with Select rights.
    We tried to regenerate the error for other users but didnt happen.
    Portal::ALUI Portal 6.5
    Please suggest!!
    if you need more information about the issue i'll be greatful to provide the info
    Thanks!!
    Edited by: electrazy on Aug 26, 2010 5:58 AM

    The trascription doesn't take place on your phone. The audio file is processed a little on the phone and then sent to Apple's servers for the bulk of the work, and the resulting text is sent back to your phone.
    Sometimes there might be problems connecting to the internet to send the file. Sometimes there might be problems with Apple's servers in a specific region. In my case if I go outside my house a bit my phone will still be trying to connect to the wifi (there is just a little bit of a signal). There isn't enough wifi to handle sending the audio files to Apple, but enough that the phone keeps trying to use it.
    Things that sometimes help. Turn off wifi if it is weak. Put your phone into airplane mode for a few seconds and then turn the radio back on.
    If the problem is at Apple's end. Just wait a while.

  • An error 1069 - )The service did not start due to logon failure) occurred while performing this service operation ...

    Hi All,
    We seem to be being plagued by the error below by our SQL Server agent. This happens almost everytime we restart the server that has been running for a day or two.
    Our SQL Server Agent uses a none expiring domain credential. I understand that this problem only happens when the profile being used by the SQL Servr Agent has changed (password change). What puzzles me is that the login is A ok and no changes has been made to it's password.
    We always resolve this problem by changing the login used in the SQL Server Agent to local and after that, returning it back to it's original domain login. Unfortunately, we cant always do this everytime something goes wrong.
    Can anyone please help us shed a light on this? We're using SQL2k with SP3a. Thanks!
    Error:
    An error 1069 - )The service did not start due to logon failure) occurred while performing this service operation on the SQLServerAgent service.
    Regards,
    Joseph

    Ran into this error, and the password was correct. What the System Event Log said:
    Code SnippetEvent Type: Error
    Event Source: Service Control Manager
    Event Category: None
    Event ID: 7041
    Date: 10/8/2008
    Time: 9:33:09 AM
    User: N/A
    Computer: ComputerName
    Description:
    The SQLSERVERAGENT service was unable to log on as DomainName\SQLAgent with the currently configured password due to the following error:
    Logon failure: the user has not been granted the requested logon type at this computer.
    Service: SQLSERVERAGENT
    Domain and account: DomainName\SQLAgent
    This service account does not have the necessary user right "Log on as a service."
    User Action
    Assign "Log on as a service" to the service account on this computer. You can use Local Security Settings (Secpol.msc) to do this. If this computer is a node in a cluster, check that this user right is assigned to the Cluster service account on all nodes in the cluster.
    If you have already assigned this user right to the service account, and the user right appears to be removed, a Group Policy object associated with this node might be removing the right. Check with your domain administrator to find out if this is happening.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp
    ...sure enough it had been removed from the "Logon as a service" list. Hope this helps.

  • In sqlplus after a bad compile where does the show errors data exist?

    I am creating an automated deploy of code for project releases. In sqlplus I use the whenever command for sql errors but it doesn't catch bad compiles. When the process runs it runs as a dba user having the stored procs fully qualified causing the compile error not show in the user_errors but in all_errors. While experimenting I saw that another user could get a new record put into all_errors but my session when in sqlplus I still see the error from my compile from SHOW ERRORS. My question is where is the data from the show errors in my session stored and is it available for me to query so I can check for compile errors within sqlplus?
    Hope that was clear .
    Thanks,
    Ken

    In sqlplus ...You are in the wrong forum. This is for Oracle Forms.

  • Can't download mountain lion from app store, shows error message: retry/cancel and starts from begining

    can't download mountain lion from app store, shows error message: retry/cancel and starts from begining,
    I alreasy paid for it
    Can I get a direct download link other than from app store

    Try opening the Terminal utility in your system and running the following command to open the system's caches folder:
    open $TMPDIR../C
    Then locate and remove the folder called "com.apple.appstore" and then try relaunching the App Store and downloading the installer again.

  • We have licensed version of Adobe CS6, but when we start it shows error Maximum Activations Exceeded, We are unable to activate Creative Cloud.

    We have licensed version of Adobe CS6, but when we start it shows error Maximum Activations Exceeded, We are unable to activate Creative Cloud.@

    CS6 perpetual Mac is version 13.0.6 Windows is version 13.0.1.3 Subscription cloud version is 13.1.2.  If you have a cloud subscription and a perpetual licence you would not be able to have both version install at the same time on same machine. What does your Creative Cloud desktop application show and if you start CS6 if the flash screen shows or you can get to menu Help>About Photoshop what version i shown 13.0.6  or 13.0.1.3 or 13.1.2?

  • Hi I am having iphone 4S. Today while connecting to my laptop for regular update, my phone started rebooting and message showed error in rebooting. Now even though i connected to laptop which has internet connection, i phone OS booting still not completed

    Hi I am having iphone 4S. Today while connecting to my laptop for regular update, my phone started rebooting and message showed error in rebooting. Now even though i connected to laptop which has internet connection, i phone OS booting still not completed

    I have factory reset my phone twice.. I have disabled iCloud settings.. I looked up possible downgrading options.. which isn't possible. I feel as if my iPhone 4 was offered the update so I was forced to get another phone

  • My CS6 photoshop started showing cannot perform function programming error then it started freezing please help?

    My CS6 photoshop started showing {cannot perform function programming error}
    then it started freezing please help?

    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • HT1386 My IPad2 will not sync with my iMac anymore, keeps giving me an error of failure to start sync after it has tried for 2-3 minutes

    My IPad2 will not sync with my iMac anymore, keeps giving me an error of failure to start sync after it has tried for 2-3 minutes

    Cenzon-
    Are you syncing over WiFi or over the USB cable?  Try doing the opposite.
    Also try a different USB port on the iMac.
    Fred

  • Redwood showing as failure (error) despite the loads being successful in BW

    When a particular DTP step fails due to data issue we can make the overall status green manually thus pushing the chain further. Whereas in Redwood side this is showing as failure (error) despite the loads being successful in BW Side.

    Hi Ramesh,
    Is this for a process chain triggered from CPS or triggered in BW (see also your other question regarding interception/monitoring of BI process chains) ?
    If the process chain is triggered from CPS, the control is assumed to be at CPS so the restart should be done from CPS as well.
    Regards,
    Anton.

  • My computer keeps showing error smart disk failure

    My computer keeps showing error smart disk failure on booting startup screen and also my backups system stopped completely
    and my DVD/CD writer ROM has stop working indicating red light on my lens light area. and has stop indicating itselve at task manerg area
    This question was solved.
    View Solution.

    The error means the hdd is failing and will have to be replaced with a new one.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • After updating to ios6 my iPad 2 started showing an error saying "Restore needed this IPhone cannot make or receive any calls "--Even after restoring it shows the same error and then it restarts. It is ipad2 CDMA Verizon and I live in India. HELP PLZ!!

    It was working properly for 9 months then suddenly it started showing me this error.

    Resolve iOS update and restore errors - Apple Support

  • ORABPEL START-UP ERROR!!!!!!!! - Connection Pool Deployment failure

    I have installed BPEL Process Manager with Weblogic 8.1SP4.
    I am using Oracle Database 9.2.0.5.0 for Oracle BPEL Process
    Manager installation.
    Also i have made following changes for JDBC thin driver accordingly.
    <JDBCConnectionPool CapacityIncrement="2"
    DriverName="oracle.jdbc.OracleDriver"
    MaxCapacity="15" LoginDelaySeconds="1"
    Name="BPELServerPool"
    ShrinkPeriodMinutes="15"
    ShrinkingEnabled="true" SupportsLocalTransaction="true"
    Targets="orabpelServer"
    URL="jdbc:oracle:thin:orabpel/orabpel_password@hostname:port:database_servoce_
    name"/>
    I m getting following error while starting the server :-
    Connection Pool "BPELServerPool" deployment failed with the following error: 0:Could not create pool connection. The DBMS driver exception was: invalid arguments in call.
    Also I m getting following error during startup
    ORABPEL-04076
    Cannot lookup jdbc datasource.
    The process domain was unable to lookup the TX datasource "BPELServerDataSourceWorkflow".
    Please check that the machine hosting the datasource is physically connected to the network. Additionally check that the connection pool properties as defined in the application server startup properties are valid.
    at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.init(ConnectionFactory.java:268)
    at com.collaxa.cube.engine.data.ConnectionFactory.update(ConnectionFactory.java:54)
    at com.collaxa.cube.engine.data.ConnectionFactory.init(ConnectionFactory.java:42)
    at com.collaxa.cube.admin.data.ServerConnectionFactory.init(ServerConnectionFactory.java:34)
    at com.collaxa.cube.admin.adaptors.ServerAdaptorManager.init(ServerAdaptorManager.java:66)
    at com.collaxa.cube.admin.ServerManager.__init(ServerManager.java:211)
    at com.collaxa.cube.admin.ServerManager.init(ServerManager.java:99)
    at com.collaxa.cube.ejb.impl.ServerBean.init(ServerBean.java:200)
    at com.collaxa.cube.ejb.impl.ServerBean_g9inc6_EOImpl.init(ServerBean_g9inc6_EOImpl.java:856)
    at com.collaxa.cube.admin.CXLoaderServlet.init(CXLoaderServlet.java:62)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1028)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:904)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:883)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:822)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3333)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3278)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3259)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5949)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:862)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2127)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2168)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2115)
    at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3082)
    at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1751)
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:359)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
    at weblogic.Server.main(Server.java:32)
    <Error> <HTTP> <BEA-101216> <Servlet: "cxloader" failed to preload on startup in Web application: "startup".
    javax.servlet.ServletException:
    ORABPEL START-UP ERROR!!!!!!!!
    Can Anyone kindly suggest what is the problem ?

    I have installed BPEL Process Manager with Weblogic 8.1SP4.
    I am using Oracle Database 9.2.0.5.0 for Oracle BPEL Process
    Manager installation.
    Also i have made following changes for JDBC thin driver accordingly.
    <JDBCConnectionPool CapacityIncrement="2"
    DriverName="oracle.jdbc.OracleDriver"
    MaxCapacity="15" LoginDelaySeconds="1"
    Name="BPELServerPool"
    ShrinkPeriodMinutes="15"
    ShrinkingEnabled="true" SupportsLocalTransaction="true"
    Targets="orabpelServer"
    URL="jdbc:oracle:thin:orabpel/orabpel_password@hostname:port:database_servoce_
    name"/>
    I m getting following error while starting the server :-
    Connection Pool "BPELServerPool" deployment failed with the following error: 0:Could not create pool connection. The DBMS driver exception was: invalid arguments in call.
    Also I m getting following error during startup
    ORABPEL-04076
    Cannot lookup jdbc datasource.
    The process domain was unable to lookup the TX datasource "BPELServerDataSourceWorkflow".
    Please check that the machine hosting the datasource is physically connected to the network. Additionally check that the connection pool properties as defined in the application server startup properties are valid.
    at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.init(ConnectionFactory.java:268)
    at com.collaxa.cube.engine.data.ConnectionFactory.update(ConnectionFactory.java:54)
    at com.collaxa.cube.engine.data.ConnectionFactory.init(ConnectionFactory.java:42)
    at com.collaxa.cube.admin.data.ServerConnectionFactory.init(ServerConnectionFactory.java:34)
    at com.collaxa.cube.admin.adaptors.ServerAdaptorManager.init(ServerAdaptorManager.java:66)
    at com.collaxa.cube.admin.ServerManager.__init(ServerManager.java:211)
    at com.collaxa.cube.admin.ServerManager.init(ServerManager.java:99)
    at com.collaxa.cube.ejb.impl.ServerBean.init(ServerBean.java:200)
    at com.collaxa.cube.ejb.impl.ServerBean_g9inc6_EOImpl.init(ServerBean_g9inc6_EOImpl.java:856)
    at com.collaxa.cube.admin.CXLoaderServlet.init(CXLoaderServlet.java:62)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1028)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:904)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:883)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:822)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3333)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3278)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3259)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5949)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:862)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2127)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2168)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2115)
    at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3082)
    at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1751)
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:359)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
    at weblogic.Server.main(Server.java:32)
    <Error> <HTTP> <BEA-101216> <Servlet: "cxloader" failed to preload on startup in Web application: "startup".
    javax.servlet.ServletException:
    ORABPEL START-UP ERROR!!!!!!!!
    Can Anyone kindly suggest what is the problem ?

  • When re installing iTunes on window it shows error message: Service Apple mobil divice does not start

    When re installing iTunes on window it shows error message: Service Apple mobil divice does not start

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • How to fix , when start the SQL Server Fulltext Search show error ?

    show error : the request failed or the service did not respond in a timely fashion

    Hi srajmuneer,
    Please post the detail Windows Application Error Log regarding this issue for fur investigation. In addition, please also try to update "K10\Administrator" account password for SQL Server FullText Search service.
    Hope this helps.
    Regards,
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • Oracle installation problem on linux

    HI, I AM TRYING TO INSTALL ORACLE 8.1.7 ON LINUX RED HAT(7.1). AFTER DOING ALL THE STEPS WHEN I RUN(./runInstaller) I am getting message "Initializing java virtual machine from ../stage/components/oracle.swd.jre/1.1.8/1/datafiles/Expanded/Linux/bin/j

  • Encore CS6 crash during build. help please URGENT

    Hi, this is my first dvd in encore but I did lots of dvd on dvdstudio. My project has 1 main menu, 5 submenus. 2 timeline and more than 50 chapter list access by these sub menus. with option of play once, loop etc. Check dvd only bring back an error

  • Master - Detail LOV

    Is it possible to create two LOVs on the same page. That have master � detail relationship between them? Something like: 1)     P1_LOV - LOV based on �select dname d, dcode r from dept� 2)     P1_LOV1 - LOV based on �select ename d, ecode r from enam

  • Group messaging since iOS 5 update

    I strongly dislike the group messaging feature, where all recipients in a group text receive replies from everyone. I had this fixed a long time ago by simply turning this feature off. Since the update (not sure if it started with iOS5 or 5.0.1), it

  • Adobe reader crash continuosly iPad air

    Why its happening When i editing a document?