Exiting from sqlplus prompt if file not found

I often execute .sql files from my shell scripts. If the .sql file is not present then sqlplus command logs onto sql prompt but stays there saying file not found.
Is there a way I can make sqlplus exit if the file is not found.
I believe one of the option should be specifying some condition in the .sql file.

Hi,
Tricky problem! WHENEVER OSERROR EXIT is the right command, but where can you put it?
If foo.sql doesn't exist, then clearly you can't put it in foo.sql.
Even putting in in login.sql doesn't seem to work.
What you can do is write a script that you know will exist, and always run that to launch your real script.
For example, you can write a script called try_to_run.sql, like this:
WHENEVER  OSERROR  EXIT
@&1Pass the name of your real script as &1, like this:
sqlplus  scott/tiger@dbanme  @try_to_run  real_scriptor, if real_script.sql takes arguments:
sqlplus  scott/tiger@dbanme  @try_to_run  "real_script arg1  arg2  arg3"

Similar Messages

  • HT203164 Error trying to burn a CD from an iTunes playlist - files not found on hard drive??

    I have a new computer with Windows 8 Home Premium.  Before the old computer crashed, I had backed up all my iTunes Media in the cloud.  I had also purchased a soundtrack album from the iTunes store and put the songs into a playlist.  All media was matched with the new computer, and the new computer was authorized by me in iTunes, so all my previous media shows up in iTunes on the new computer.  The only symbol next to the song titles in iTunes for all my songs is a picture of a tiny cloud.
    When I play the songs in the playlist from the new computer in iTunes, they all play just fine.  However, when I try to burn a CD with the songs in the playlist, I get this error message (it has no number associated with it):  The song "[name of song]" could not be burned because the file cannot be found on the computer hard drive.  I tried burning CD's from any other playlist but was not able to burn a CD from ANY playlist; I get the same error message no matter what I try to do.  I would really like to be able burn CD's from iTunes, because that's what plays in my car.  Hooking up an iPod in the car does play music, but it is faded and of bad quality (my car is an '05 model).
    Does anyone have any ideas on what is wrong here and how I can fix it so burning CD's in iTunes will again be an option?  I don't burn many CD's but would really like to be able to do so.  The version of iTunes I have is 11, all the iTunes files are updated, and the CD drive is working fine,  I am able to play CD's in iTunes from it and burn other songs to it using another media player.  I am also using top-quality new blank CD's, and when trying to burn a CD from a playlist, I select Audio CD with 2 seconds for the gap between songs, and the album text, then I select Burn.  I've tried selecting other options in turn, but get the same error message.
    Thank you in advance to anyone who can help with this issue - it seems I am the only one having it.

    I actually solved this problem myself.  I discovered, while playing around with the new iTunes, that clicking on PLAYLISTS on the menu bar shows the playlists that I have created on the left side of the window (like the old iTunes used to do by default).  I scrolled down to the playlist I wanted to burn to a CD, right-clicked on it, and a menu came up.  I selected DOWNLOAD....this downloads my playlist songs from the cloud to my computer hard drive.  After that, the little "cloud pictures" next to my songs disappeared, and I was able to burn the CD with no problems.
    I hope this helps someone else....I was quite lost for a while.  Which is amazing, considering how user-friendly most Apple products have historically been.

  • "File Not Found" When opening a file in illustrator CS3

        I having issues where when I click on a file it launches illustrator but then I get prompted with file not found. I then open illustrator and browse to the file and am to open it....any ideas? This one has me stumped.

    I think I found the problem. I am using Illustrator CS5 (15.0.02) running on MacOS (10.7.5).
    In my script, Folder.selectDialog function was returning "file:///Users/alex/Apps/temp", when I selected the temp folder from the dialog box. I want the function to return "/Users/alex/Apps/temp". If I hardcode the path (as shown below), the javascript runs fine.
    // Select the source folder.
    //sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator files', '~' );
    sourceFolder = Folder("/Users/alex/Apps/temp");

  • Oracle DB 11g Release 2 Installation in Solaris OS for SAP - issue: Files not found

    Hello All,
    Having problem during my installation of oracle DB.
    the installer keeps on prompting that files not found and the directories and files permission seems different from expected
    I attached the images of the files the installer is looking for and also the /oracle/<SID>/11ginstall_11202.log
    I also attached the thing i put in ENV command
    Not sure if its the issue in the oracle profile or installer itself or wrong input
    please help

    Hi Frogoso,
    Please have a check on the known issues SAP note for Oracle installation.
    Section G: is related to Solaris
    1431796 - Oracle 11.2.0: Troubleshooting the Software Installation
    You may re-check whether all the Solaris related pre-requisites are met before executin RUNINSTALLER.
    Suggestion here would be to go with latest available Oracle patch 11.2.0.4 as you are installing a new system.
    Hope this helps.
    Regards,
    Deepak Kori

  • Exiting from SQLPLUS on failure returned from a function

    I am working on Oracle 11g (R2). I want to call a function in package and if that function returns zero then I want to quit/exit from SQLPLUS prompt.
    I will be calling that function of package from an .sql file.
    How can i do this?
    I can also call raise_application_error() from that function. Without using WHENEVER SQLERROR EXIT, is there any way of doing this?

    Thanks, but if i am calling that function from a .sql file, can i verify the return value and exit from sqlplus prompt.

  • File not found, Error= –43

    Everytime i try to make a new project logic pro does not accept audiophiles i use from other project-folders (File not found, Error= -43).
    Even with the newest logic-version (10.0.7) and also a new mac book pro (moving via migration assistant) it does not work.

    Hi,
    I have a 'file not found' problem with Logic Express. A while back I transferred all my Logic files to DVD to make room on the hard drive. It took 4 discs, saved alphabetically by song title. Now, I nearly always get the 'file-not'found' error message when I try to work on something. Sometimes when I click 'search' it finds the file, sometimes it doesn't. I'm confident that I didn't delete the files.
    Wondering if 'search' would find the files if I transferred all the files from DVD to a single folder on an external drive. I don't use the 'search manually' option, because I'm not really sure what I'm looking for, or where to look. In the other room, perhaps? 'Computer challenged' is me. Any suggestions?
    DS

  • Error when using API.DataWindow.Utilities.mShellAndWait: File not found

    I am trying to run a simple command using API.DataWindow.Utilities.mShellAndWait, however I am experiencing the following error in FDM web. Strangely, I do not see the same error when the command is run from FDM Workbench:
    Error: File not found
    At Line: ###
    The command is as follows:
    Dim strCMD
    strCMD = "ECHO %DATE% %TIME% >> \\<servername>\<folder1>\<folder2>\File.Log"
    API.DataWindow.Utilities.mShellAndWait strCMD, 0
    This command works fine when run directly from the command line. I am using a UNC path so thought this would have worked. Can anyone please suggest how I can resolve this? I have also tried the following and this results in a similar error:
    Dim strCMD
    strCMD = "ECHO %DATE% %TIME% >> \\<servername>\<folder1>\<folder2>\File.Log"
    Set WshShell = CreateObject("WScript.Shell")
    Set WshShellExec = WshShell.Exec(strCMD)
    Error: The system cannot find the file specified.

    I would expect the issue is due to user access priviledges.
    When you run it through Workbench, the shell and wait is using your (logged on user's) credentials.
    When it operates through the web stie, it is using the service account credentials.
    If the service account does not have permissions, that could explain the 'file not found', though I would expect an access is denied error.
    $.02

  • E FMS File not found

    Somehow I cant sync my Ical with .mac
    I get the following massage from Isync: "E FMS File not found"
    It worked for about 2 months but since a few days i always get this error.
    Please help.
    Thanks
    Power BookG   Mac OS X (10.3.9)  

    YAY!
    [johnc@ ~]$ sensors
    acpitz-virtual-0
    Adapter: Virtual device
    temp1:       +40.0°C  (crit = +75.0°C)                 
    atk0110-acpi-0
    Adapter: ACPI interface
    Vcore Voltage:          +1.32 V  (min =  +1.45 V, max =  +1.75 V)
    +3.3 Voltage:          +3.35 V  (min =  +3.00 V, max =  +3.60 V)
    +5.0 Voltage:          +5.13 V  (min =  +4.50 V, max =  +5.50 V)
    +12.0 Voltage:         +12.63 V  (min = +11.20 V, max = +13.20 V)
    CPU FAN Speed:         3391 RPM  (min =    0 RPM)
    CHASSIS FAN Speed:        0 RPM  (min =    0 RPM)
    POWER FAN Speed:       1278 RPM  (min =    0 RPM)
    CHASSIS4 FAN FAN Speed:   0 RPM  (min =    0 RPM)
    CHASSIS2 FAN FAN Speed:   0 RPM  (min =    0 RPM)
    CHASSIS3 FAN FAN Speed:1553 RPM  (min =    0 RPM)
    CPU Temperature:        +31.0°C  (high = +90.0°C, crit = +125.0°C) 
    MB Temperature:         +34.0°C  (high = +45.0°C, crit = +90.0°C) 
    k8temp-pci-00c3
    Adapter: PCI adapter
    Core0 Temp:  +32.0°C                                   
    Core1 Temp:  +38.0°C
    Last edited by purple12 (2010-08-20 01:38:22)

  • How can I stop Firefox from opening (to "File Not Found") when opening my Opera browser?

    Ever since I installed Opera 10.61 on my new computer (Windows 7 Ultimate operating system), whenever I open Opera, Firefox opens one second later with the following error message:
    '''File not found '''
    Firefox can't find the file at /C:/Users/Nasheed/AppData/Local/Opera/Opera/temporary_downloads/client-en.xml.
    * Check the file name for capitalization or other typing errors.
    * Check to see if the file was moved, renamed or deleted.
    TRY AGAIN.
    <nowiki>****************************************************</nowiki><br />
    This happens EVERY TIME I OPEN THE OPERA BROWSER. How can I stop this from happening? I'm stumped.
    [EXTRA INFO - I was unable to enable Firefox to access my previous profile on the new computer (despite putting the old profile in the appropriate Mozilla Firefox folder. So, there are now two profiles in that location.
    After reading the answer to another forum member's question, I attempted to resolve the problem using Profile Manager, but I was unable to locate the Profile Manager. The Windows "Search" feature is not enabled on my new computer (nor can it be enabled from the Customize Start Menu options).]

    Thank you for your response, Cor-el.
    I had Opera set as my default browser since this began happening. I changed my default browser back to Firefox mainly because having Firefox open one or two seconds every time I open Opera was/is such a nuisance.
    I believe this problem began because I attempted to manually transfer the files from my old computer to the new one (via the backed up files in my external drive). I was unfamiliar with Windows 7 when I did this. Microsoft changed the file set up from what I had been used to in Windows XP. I used XP for six years before being exposed to Windows 7 (I never had Vista).
    I'm almost sure this problem has something to do with where I placed the application data when I was trying to reestablish the program set up on the new computer.

  • File not found error from scheduler

    Hi,
            We have a scheduler file with .cfa extension  in the cf scheduler  which trigger some mails to certain recipients on execution.
    At the bottom option fo the scheduled task, we have checked the option to 'save output to file' and has given the file
    path. On direct execution of the given url, the  file is executed successfully and mails are fired.
    But while trying to execute the same via scheduler it is not firing the mails. On investigation of the output file,
    found the error message 'File not found'.
    Is it possible that the file get  executed when directly browsing the url and shows 'file not found' error
    while executing via cf scheduler?(CF 8 is used.)

    To be more specific,
    the url format given in the cf admin scheduler is like this:
    "http://www.domainname.com/myfolder/myfile.cfa"
    A file path to log the output is also given to publish.
    If we copy the above url to a browser and execute, the file gets executed and mails are fired.
    If we set the interval or run the scheduler from the administrator,mails are not sent.On examination of log file given in the scheduler section, it is
    showing error '/myfolder/myfile.cfa' file not found.

  • File not found error (404) from web browser

    I installed 901 DB on different Oracle home and iAS 1.0.2.2 in a
    different Oracle home. The ifsconfig went thru fine.
    However I am unable to access the login page ( I executed
    ifsapachesetup ). I tried to access
    http://<machine>:<port>/servlet/files.
    I see the following error in Jserv.log
    ajp12: Servlet Error: NoClassDefFoundError:
    oracle.ifs.protocols.dav.impl.IfsDavServlet
    On the browser I get File not found error ( HTTP 404 )
    Do I need to perform additional steps on Solaris machine ( apart
    from executing apache setup script ).
    Please help me.

    Make sure you have started all the services:
    - ifsjservctl -start
    - ifslaunchdc
    - ifslaunchnode
    - ifsstartdomain
    all are in the iFS bin directory.
    Keith

  • Error 7: File not found occurs in 8.2 from transition of 4.1. Specifying the file in file dialog returns error although file is in the directory.

    Copied a program from 4.1 to 8.2 recently and receive an error 7: File not found at open file+.vi.  The program is built so a file dialog will pop up and ask for the destination of the file.  Eventhough there is a file in the specified directory, an error is returned.  Running open file+.vi by itself returns no error with the same file designation.  Any clues?

    noviceak,
    Welcome to the NI Discussion Forums.
    I created a quick VI in LabVIEW 4.1 that displays a file dialog and then passes that file path to "Read Characters from File.vi" (which in turn calls Open File+.vi).  I then opened this file in LabVIEW 8.2 and ran it successfully (see code screenshot below).
    When you say there is a file in the specified directory are you using the file dialog to browse to the directory or to select the specific file?  Open File+.vi expects the path to a file rather than a directory - that is C:\folder\file.txt rather than C:\folder.  You might also want to create an indicator or probe to see what path is being passed to Open File+ to ensure it is what you expect.
    I feel like I should also say that in the days (years) inbetween LabVIEW 4.1 and 8.2 the file operation VIs have changed significantly.  While the old Open File+.vi still lives in vi.lib for compatibility purposes we no longer recommend using it for new applications.
    I hope this helps and again, welcome to the community.
    Regards,
    Simon H
    Applications Engineer
    National Instruments
    http://www.ni.com/support/
    Message Edited by Simon H on 01-18-2007 08:01 PM
    Message Edited by Simon H on 01-18-2007 08:03 PM
    Attachments:
    LV4 File Dialog.png ‏3 KB

  • File Not found error when calling Form Post Method to a JSP from JSP Portlet

    I have built a set of JSP forms using post method to call other JSPs. Normally, the code looks like
    <form name="MyForm" action="MyJsp.jsp" method="post">
    I migrated the calling form containing this code to a portlet, but not the MyJsp.jsp. When I submit the form, I get a file not found in Jserv.log
    Exception:javax.servlet.ServletException: java.io.FileNotFoundException: D:\servlet\RegisterCompany.jsp (The system cannot find the file specified)
    [14/06/2001 13:59:59:679 PDT] JspServlet: unable to dispatch to requested page: Exception:javax.servlet.ServletException: java.io.FileNotFoundException: d:\oracle\isuites\apache\apache\MyJsp.jsp (The system cannot find the file specified)
    I notice that launching the calling jsp from a portlet, my opriginal context that uses ../Apache/Apache/htdocs is not being searched for the JSp. Why is this? Moreover, I try to set up an Alias in httpd.conf file to the this director and use it with the jsp in the action tag, but still get an error that my jsp servlets/Myjsp can't be found. Why is it insiting on looking at servlets context instead of htdocs.
    I have none of these issues outside of Portal30 using IAS.
    regard

    Initially, I couldn't do this unless I moved tghe jsp's up to the root directory of IAS, i.e ../Apache/Apache. Nomrally, htdocs is my doc directory for IAS. I could not do http:\\myUrl\htdocs\myJsp. If I tgried this, I got an error in Apache error logg that said can't find file ..\htdocs\htdocs\MyJsp.jsp.
    If I just tried the the URL http:\\myUrl\MyJsp.jsp with Jsp file in htdocs, I would get an error in the Jserve log that file d:\oracle\isuites\apache\apache\MyJsp.jsp could not be found. Once I moved the file MyJsp to Apache/Apache directory, it could be found using http:\\myUrl\MyJsp.jsp. Later, I delted these files and kept the ones in htdocs and they continued to work.
    I'm confused why launching pages through portal isn't consistant with Apache Standards. Where is the documentation that tells me how to configure context and aliases for pages launched from portal pages?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Sue Vickers ([email protected]):
    David,
    Passing information using Portal is different than just using Apache/Jserv. Does it work in portal if you use the absolute path?
    <form name="MyForm" action="http://host.domain/MyJSP.jsp" method="post">
    Portal will not be on the same relative path as your Apache, so you may need to adjust your action somehow.
    Thanks,
    Sue<HR></BLOCKQUOTE>
    null

  • Launch Wine programs from menu: FIle not Found

    I have installed eMule with wine, and get the "File not found" message when running it from the menu.
    This was discussed in THIS thread, but none of the possible solutions work for me
    Original:
    env WINEPREFIX="/home/daerunarch/.wine" wine C:\\windows\\command\\start.exe /Unix /home/daerunarch/.wine/dosdevices/c:/users/Public/Start\ Menu/Programs/eMule/eMule.lnk
    Doesn't work
    Edited the menu entry with alacarte:
    wine 'C:\Program Files\eMule\emule.exe'
    doesn't work
    wine '.wine/drive_c/Program Files/eMule/emule.exe'
    doesnt' work
    wine "/home/username/.wine/drive_c/Program Files/eMule/emule.exe"
    doesn't work
    wine "/home/username/.local/share/applications/wine/Programs/eMule/eMule.desktop"
    dosen't work
    Also all the previous begining with "env WINEPREFIX=" instead of "wine". Nothing worked o_0 What should I try now?
    Last edited by Daerun (2011-02-13 23:36:46)

    Null, the problem is not running from gnome menu. I can make it run from console, and it shows these messages, just in case there's some hint here:
    wine '.wine/drive_c/Program Files/eMule/emule.exe'
    wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
    err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
    fixme:heap:HeapSetInformation (nil) 1 (nil) 0
    fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),4,3,(nil),0,(nil)) - stub!
    err:ole:CoGetClassObject class {5c63c1ad-3956-4ff8-8486-40034758315b} not registered
    err:ole:CoGetClassObject class {5c63c1ad-3956-4ff8-8486-40034758315b} not registered
    err:ole:create_server class {5c63c1ad-3956-4ff8-8486-40034758315b} not registered
    fixme:ole:CoGetClassObject CLSCTX_REMOTE_SERVER not supported
    err:ole:CoGetClassObject no class object {5c63c1ad-3956-4ff8-8486-40034758315b} could be created for context 0x17
    err:winediag:WSASocketW Failed to create a socket of type SOCK_RAW, this requires special permissions.
    err:winediag:IcmpCreateFile Failed to use ICMP (network ping), this requires special permissions.
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033c914
    fixme:richedit:ME_HandleMessage EM_GETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
    fixme:richedit:ME_HandleMessage EM_GETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
    fixme:richedit:ME_HandleMessage EM_GETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
    fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
    fixme:shell:IAutoComplete2_fnInit ACO_FILTERPREFIXES not supported
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca34
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca38
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca4c
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca1c
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca1c
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca1c
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca1c
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca1c
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca48
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033ca48
    fixme:shell:IAutoComplete2_fnInit ACO_FILTERPREFIXES not supported
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033c9e8
    err:listview:LISTVIEW_WindowProc unknown msg 108a wp=00000000 lp=0033c9e8
    fixme:richedit:ME_HandleMessage EM_GETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETLANGOPTIONS: stub
    fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
    Karol, that command didn't do anything for me...
    Turvyc, I know about aMule and have used it, but stuck to eMule because of some features it didn't have. If I can't run eMule I might as well return to aMule, as I know how to migrate configurations.

  • When I call VI on Linux from Teststand on Windows using TCP/IP I get "file not found error".any sugeestions?

    I am trying to execute a VI running on Linux from Teststand running on windows 2000 prof ,both running on two different machines.I used TCP/IP for the interface using the following steps on Labview VI:tools>options>VIserver>TCP/IP and gave the ip address of both the machines.When I gave the file path as c:\home\test.vi in Edit labview Vi call window(the Vi in linux is stored in /home/test.vi)and also in remote vi path:/home/test.vi,I get a file not found error.The teststand version is 3.0 and labview is 7.0.Any idea why this is happening and any solutions?

    priya guru,
    Here is a knowledge base that addresses your question: �How do I call test VIs that reside on a non-Windows platform from TestStand?�
    You also need to set TCP/IP Access found in Tools->Options->'VI Server: TCP/IP Access'. Make sure that you list the IP address in the Access List to allow TCP/IP access to that machine. Finally you need to specify which VIs are accessible to remote applications. Open up Tools->Options->'VI Server: Exported VIs' and provide paths to the VIs you wish to be remotely accessible.
    I have attached an example VI that demonstrates VI Server in action. Please post back if you are still having problems. Good luck!
    Cr
    aig H.
    National Instruments
    Attachments:
    Remote_Run_--_VI_Server.zip ‏88 KB

Maybe you are looking for

  • HT5538 can i use one apple ids on different iPhones?

    I have two iphones, one for US use and one for international use. Can I use the same apple IDs on both? can I use the two fhone numbers on iMessage and FaceTime?

  • Zen Vision:M's accessories that allow to play movies on TV scre

    Is there any accessories for Vision:M that will allow me to play movies from Vision:M but displayed on TV? I really would like to play movies I have on Vision:M but watch it on standard TV instead. Thanks in advanced, Nattawat

  • Inventory in MM impossible without paper

    Hello, My client would like to do an inventory in a storage location (no WM-managed) without printed inventory document (with handheld and wifi) Unfortunately, the transaction to count (MI08, MI04) could not be sorted out or displayed by the storage

  • Updating template based XSLT page

    I have the following setup: a template and a few HTML pages based on it plus a few XSLT(.xsl) pages based on that template. Whenever I change the template, the HTML pages are automatically updated, but not the XSLT ones, even tough they appear in the

  • MaxDB instance error sap netweaver trial version 7.0

    I installed sap netweaver trial version 7.0 in e drive which has got 60 GB.netweaver and sap logon front end installed and max db also installed suscessfully when configuring maxdb database i.e adding new instance  the following error appears. <b>-4