Execution of the SQL file error break

I have a build file where I call my DB objects creation scripts. For example:
@COUNTRY_MASTER.sql
@COUNTRY_MASTER_AUDIT.sql
@COUNTRY_MASTER_TEMPTABLE.sql
@COUNTRY_MASTER_WORKTABLE.sql

I want to pause, or the output of the execution of this script in case of failure of any script. Also in the event of failure, I want to know where the script failed (what a line and file name).

You can leave sqlplus when an error occurs using the macro command WHENEVER :

 WHENEVER OSERROR
 ----------------

 Performs the specified action (exits SQL*Plus by default) if an
 operating system error occurs (such as a file writing error).
 In iSQL*Plus, performs the specified action (stops the current
 script by default) and returns focus to the Workspace if an
 operating system error occurs.

 WHENEVER OSERROR {EXIT [SUCCESS|FAILURE|n|variable|:BindVariable]
                   [COMMIT|ROLLBACK] | CONTINUE [COMMIT|ROLLBACK|NONE]}

 WHENEVER SQLERROR
 -----------------

 Performs the specified action (exits SQL*Plus by default) if a
 SQL command or PL/SQL block generates an error.
 In iSQL*Plus, performs the specified action (stops the current
 script by default) and returns focus to the Workspace if a SQL
 command or PL/SQL block generates an error.

 WHENEVER SQLERROR {EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable]
                    [COMMIT|ROLLBACK] | CONTINUE [COMMIT|ROLLBACK|NONE]}

There is no command for interruption of treatment when an error occurs. Sqlplus command language is very primitive. There is no simple way to perform conditional processing. And user interaction is limited to ask for values for substitution variables.

Tags: Database

Similar Questions

  • Run the .sql file error

    Hello
    Every time when I run the below plsql, it's keep lance the error as show below output, this product even when I manually create the trigger before you run the file .sql of all the below statements, can you please correct me what I'm doing wrong here. Thank you.
    DROP TABLE FCSDWH.REF_DATA_MASTER;
    
    CREATE TABLE FCSDWH.REF_DATA_MASTER
    (
    REF_DATA_MASTER_ID                      NUMBER PRIMARY KEY,
    DESCRIPTION                                     VARCHAR2(255 CHAR),
    CREATE_ID                                       VARCHAR2(10 CHAR),
    CREATE_DT                                       DATE,
    LST_UPD_ID                                      VARCHAR2(10 CHAR),
    LST_UPD_DT                                      DATE,
    ACT_STRT_DT                                     DATE,
    ACT_END_DT                                      DATE
    )
    TABLESPACE FCSDWH
    STORAGE(INITIAL 50K);
    
    DROP SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ;
    
    CREATE SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ START WITH 1 INCREMENT BY 1;
    
    DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG";
    
    CREATE OR REPLACE TRIGGER FCSDWH.REF_DATA_MASTER_TRG
    BEFORE INSERT ON FCSDWH.REF_DATA_MASTER
    FOR EACH ROW
    BEGIN
    SELECT FCSDWH.REF_DATA_MASTER_SEQ.NEXTVAL INTO :NEW.REF_DATA_MASTER_ID FROM DUAL;
    END;
    /
    Output:
    SQL> @/home/smadala/REF_DATA_MASTER.SQL
    
    Table dropped.
    
    
    Table created.
    
    
    Sequence dropped.
    
    
    Sequence created.
    
    DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG"
    *
    ERROR at line 1:
    ORA-04080: trigger 'FCSDWH.REF_DATA_MASTER_TRG' does not exist
    
    
    
    Trigger created.
    
    SQL>

    Relaxation is "attached" to the table when you delete the table the trigger is going as well.

    John

  • What is "Error of Privoxy" Privoxy (oooooobo) fatal error: could not check the configuration file ':(error number 2) Config.Txt

    What is "Error of Privoxy" Privoxy (oooooobo) fatal error: could not check the configuration file ':(error number 2) Config.Txt.

    I always get this message in a long horizontal area on my desk top once I restart and turn on my computer.

    Thank you

    "Privoxy" is a 3rd party is no program not part of Windows XP.  You can go to
    Panel-> Add/Remove programs
    and remove this program.  If you still think that you need this program, try reinstalling it on Sourceforge
       <>http://sourceforge.NET/projects/ijbswa >

    HTH,
    JW

  • My Cookie file was corrupted in data and my programs continually pop up with the 'corrupt file' error when a program opens, pointing to \Users\name\Appdata\Roaming\Microsoft\Windows\Cookies.

    My Cookie file was corrupted in data and my programs continually pop up with the 'corrupt file' error when a program opens, pointing to \Users\name\Appdata\Roaming\Microsoft\Windows\Cookies.

    The problem is, Chkdsk will not fix this, and I can't access the file. This opens up a world of problems when I need to fix this error, so I can upgrade to Windows 7. Help, please!

    I just ran the scan again. He said of the errors found, but could not be repaired.

    This problem actually has nothing to do with internet explorer. It's the cookies folder that is corrupt in the Windows folder in roaming. The error file is in conjunction with the programs, that I try to run (AIM, Skype, so forth). Trying to enter the folder it says it's corrupt. I don't know what is the root of the problems or how to solve this problem, but these measures have not helped so far. Regarding the repair, I will try that next.

    http://Tinypic.com/view.php?pic=14mw4ly&s=4

    Here is a picture. This is the error of the lower right

    It's what the tool SFC to see system files corrupted and try to repair the system files.
    SFC could not fix it.

    Looks like you will need to do this:

    http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html

    Read the info on the link above.

    Good luck with it.

    Let us know how you go with it.

    See you soon.

    Mick Murphy - Microsoft partner

  • Window 7 unsuccessful backup, error message "the system cannot find the specific file" error code: 0 x 80070002.

    I tried to back up my desktop using Windows 7 upwards, but he is not successful, he stopped, message error "the system cannot find the specific file" error code: 0 x 80070002.  He said no specific file that causes the problem.

    Also, my Seagate FreeAgent, I back upwards of C: from my old PC that runs under Windows XP, which causes conflicts of the OS?  Enjoy diagnose and advise!

    Hello

    I imagine the inconvenience that you are experiencing. I will certainly help the question of fixing.

    I suggest you follow the steps in the link below and check off the question:

    0x8100002F error code and or error code 0 x 80070002 when you back up files in Windows 7:

    http://support.Microsoft.com/kb/979281

    I hope that the information above helps you.

  • Whenever I try to install and update creative cloud, he's going to halfway and stop the download says "Setup could not access the critical file (error code46).

    Whenever I try to install and update creative cloud, he's going to halfway and stop the download says "Setup could not access the critical file (error code46).

    Hello

    Please refer to the instructions mentioned in the link below, it should help:

    Cannot install Creative cloud installation - error code 46

    "Setup could not access a critical file. Please try to reinstall. (error code: 46) »

    Stop creating cloud download

    Let us know if this was helpful.

    Kind regards

    Bani

  • How to import the .sql file in oracle apex?

    I am new to oracle apex...

    How to import the .sql file in oracle apex?

    I have to import a table in apex...

    This script I have to write in the .sql file...

    pls help...

    Published by: 794244 on January 31, 2011 21:31

    Hi Manu

    You can import and browse workshop SQL, SQL Scripts .sql files. If you have multiple SQL statements in your script, make sure that they are separated by the / character

    Andy

  • Using the XML file error

    Hello

    I use an XML file as the source in a map. This worked well until I changed the context during the execution of the mapping.

    Initially, during the execution of the development, it worked without any problem. But when I changed the context to run the Test, he gave me the following error:-

    ODI-1227: task load data-LKM SQL for Oracle-don't work not to connect to the source P6_ACTIVITIES - TEST.

    Caused by: java.sql.SQLException: the object name already exists: P6ACTI_READACTIVITIESRESPONSE in the statement [create table P6ACTI_READACTIVITIESRESPONSE (READACTIVITIESRESPONSEPK NUMERIC (10) NOT NULL, SNPSFILENAME varchar (255) NULL, SNPSFILEPATH varchar (255) NULL, SNPSLOADDATE varchar (255) NULL)]

    This object name, P6ACTI_READACTIVITIESRESPONSE created by ODI is a combination of scheme name defined in the JDBC URL properties (or the first five characters of the XML file) and the element root. Therefore, I don't have any control over the name, unless I have change the schema name property.

    Restart the agent will solve the problem temporarily, but the error will appear again when the context is changed. My question is, how do I create/drop / let agent do this each time that the XML file is accessed ODI. I use ODI 12.1.3.

    Thanks in advance,

    Xmen

    Only, you should be able to query code KM to understand if these tables are created, but generally it will be in the scheme of work specified on your server of intermediate technology.

    We are not allowed to change the KMs, because it would create problems of alimony.


    Who with Oracle or internally? A large part of ODI power lies in an open framework around KMs and as long as you develop and test carefully any customizations KM I really can't see why the support would be a problem. You can run the table to fall outside the knowledge module, would be - this also be a support issue, the main difference is that a KM custom allows to reuse easier?

  • This computer does not have an enough space to the temperory files: error Code 0 x 80004005: upgrade of Vista

    Hello

    I am trying to upgrade to Vista home premium, Vista ultimate, but get the error continues on the execution of the installation program. Here is the error msg:

    This computer does not have a sufficient space for temporary files. Windows installation needs at least 445 MB of space on any partition for temporary files

    Error code: 0 x 800004005

    I want to just point out that I have 4 partition and each partition have at least 5 GB of free space on the disk with one of them having 35 GB of free space.

    Would be grateful if someone can help me solve this problem

    Concerning

    Vik

    Hello Vik.in,

    If you upgrade your Windows Vista,

    1. Open Control Panel by clicking the Start button, and then click Control Panel.
    2. Click on system and security.
    3. Click on Administrative Tools.
    4. Double-click computer management. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    5. In the navigation pane, click on disk management under storage.
    6. Select the volume that contains the existing installation of Windows Vista. In general, it is the C drive.
    7. Right-click on the volume and select Mark Partition as Active.
    8. Click Yes to confirm the action

      Note At this point, the existing Windows installation will not be able to start until the remaining steps are complete.

    9. Close computer management.
    10. Insert the Windows Vista DVD.
    11. Restart the computer.
    12. Use the Windows Vista DVD to start the computer.
    13. Choose the desired language and keyboard settings and then click Next.
    14. Click repair your computer at the bottom left of the screen.
    15. When you are prompted to repar startup data, click repair and restart.
    16. After the computer restarts, repeat steps 12 through 14.
    17. If your computer has only one installation of Windows, click Next. Otherwise, choose the correct installation of WIndows, and then click Next.
    18. Click on the link of the Startup Repair tool .
    19. Click Finish once the repair is complete. The computer should reboot to Windows Vista.
    20. Start the upgrade using the Windows Vista DVD

    Here is a link to the article that talks about it:

    http://support.Microsoft.com/kb/928232

    Hope it would work, answer back if it does not work.

    See you soon
    Syed Irfan

  • Access to the flat file error

    Hello

    My Source is access DB and target is flat file.
    The IKM I use is IKM SQL to add files.


    When I try to run the Interface, I get this error: -.

    3100: 37000: java.sql.SQLException: error [Microsoft] [ODBC Microsoft Access driver] syntax (missing operator) in query expression ' CUSTOMER. [CustomerID] CUSTOMERID "."
    java.sql.SQLException: error [Microsoft] [ODBC Microsoft Access driver] syntax (missing operator) in query expression ' CUSTOMER. [CustomerID] CUSTOMERID "."

    at sun.jdbc.odbc.JdbcOdbc.createSQLException (unknown Source)

    at sun.jdbc.odbc.JdbcOdbc.standardError (unknown Source)

    at sun.jdbc.odbc.JdbcOdbc.SQLPrepare (unknown Source)

    at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement (unknown Source)

    at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement (unknown Source)

    at com.sunopsis.sql.SnpsQuery.a (SnpsQuery.java)

    at com.sunopsis.sql.SnpsQuery.a (SnpsQuery.java)

    at com.sunopsis.sql.SnpsQuery.updateExecStatement (SnpsQuery.java)

    at com.sunopsis.sql.SnpsQuery.executeQuery (SnpsQuery.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt (SnpSessTaskSqlI.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep (SnpSessStep.java)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession (SnpSession.java)

    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand (DwgCommandSession.java)

    at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)

    at com.sunopsis.dwg.cmd.e.i (e.java)

    at com.sunopsis.dwg.cmd.g.y (g.java)

    at com.sunopsis.dwg.cmd.e.run (e.java)

    at java.lang.Thread.run (unknown Source)

    Would appreciate the help.

    Chanduwar

    Hi Chandwar,

    As we discussed in Gtalk,
    the problem is the quotes in the select query.

    Select
    CUSTOMER. "" ' Town.
    CUSTOMER. "' Region '.
    'Customer' as a CUSTOMER
    where (1 = 1)

    Please customize step KM

    <%=snpRef.getColList("", "[EXPRESSION] [ALIAS_SEP] [CX_COL_NAME]", ",\n\t", "", "INS and !TRG") %>

    to remove the quotes and the expression of the Alias
    Please reffer to the PDF API user to customize the same.

    An additional point->

    Please try to use the appropriate kms which is dedicated for each technology,
    This will improve the performance and this kind of questions.

    Kind regards
    Its

  • Creating recovery discs - "unable to open the following file" error "

    Hello all,.

    I'm trying to create a set of recovery disc for a customer * Satellite L300 - PSLB8A-07U004 *.

    While the application opens and begins the creation of the disk set, there, three times now, failed to with the error message of * 'cannot open the following file. D:\ ! "V5_01_07.VRP (error Code: 020123-F1-00000000). *

    I tried the first time in this process while all customer data were always loaded.
    I have now done a "restoration"out of box experience"because I thought that one of these files may be the cause, but, alas, the mistake was repeated."
    Of course, it's irritating (to say the least).

    I did NOT any changes to the layout or resizing of partitions. »

    Any thoughts?

    rampant_rhino

    Stand by. If I understand you well you CAN restore the operating system using F8, but you CAN create DVDs using "Toshiba Recovery Disc Creator' of recovery.

    Am I right about that?

  • "The system cannot find the specified file" error when you try to install a hotfix/cab package using the DISM tool Package Manager

    I'm testing the integrity of the addon ".cab" packages and patches by installing using the Package Manager (pkgmgr.exe), or alternatively, the Deployment Image Servicing and Management Tool (DISM.exe) for Windows 7.  To do this, I am aware that I have to call a tool through the command line.

    In the Package Manager, I use the syntax

    Command prompt > pkgmgr.exe /ip /m:C:\Test\test.cab

    Otherwise, I might add the path in quotes:

    "Command prompt > pkgmgr.exe /ip /m:"C:\Test\test.cab.

    The error returned in pkgmgr is:

    Operation failed with 0 x 80070002.  The system cannot find the specified file.

    My first impression was that my syntax is incorrect, although I can't have room for error.  The path points to "test.cab" which is a renamed windows addon that contains the necessary file "svcpack" and the file "entries_XX.ini".  I used several different ".cab" file, that which some I know to be genuine, hopefully exclude the possibility of a corrupted or incompatible file.  I also tried this procedure on different computers and received the same error code, so I doubt that the tool pkgmgr istelf is corrupt.

    Finally, I tried an alternative Windows 7/8 DISM tool to try to achieve essentially the same task by using the following syntax in a command prompt:

    "Commnand prompt > DISM.exe / Online /PackagePath:"C:\Test\test.cab Add-Package ".

    This produces a similar error:

    An error occurred trying to open it - C:\Test\test.cab error: 0 x 80070002
    Error: 2
    The system cannot find the specified file.
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    I'm really not sure why I produce these errors.  Any idea is appreciated.

    Hello

    Thanks for posting your question on the Microsoft Forum.

    I suggest you to ask your question in the TechNet forums.

    https://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w7itpronetworking&filter=AllTypes&sort=lastpostdesc

    TechNet is watched by other computing professionals who would be more likely to help you.

    I hope this helps.

    _________________

    Thank you best regards &,.

    Isha Soni

  • Windows DVD Maker do not accept the wmv files error file is not supported.

    Hello

    I just downloaded a video on YouTube using the 'FreeYouTubeDownload' of DVDVideosoft software.  He managed to create a file wmv to me.  I know it works because when I click on the video file and click on 'play', Windows Media Player automatically opens and plays the video.  So far so good.

    I want to burn the file on a DVD.  When I open Windows DVD Maker, click on 'Add items' and click on the video file wmv, I get an error message saying that the file is not supported.

    I have Windows 7 Home Premium. This is my first time using DVD creation.  I checked the DVD Maker for filters, but there aren't any.  What gives?  WMV files are supposed to be supported by DVD Maker, Yes?  My DVD authoring program is defective?  Or is the file that the program created YouTubeDownloader defective?  I think not, because Windows Media Player does not play the video.

    Any help would be appreciated!

    Following up on my own question.  Further investigation revealed that from other sources wmv files were working with DVD Maker.  Therefore, the wmv files, created by the freeware program that I used that were not compatible.  I then used the freeware program to create files avi instead, and they were working with DVD Maker.  I did my DVD and all is well.

  • HTTP Communication tutorial - parsing of the XML file error

    Hello again,

    I went through the tutorial of HTTP Communication today is here. Built just fine and it loaded into the Simulator, however when I hit refresh to load the XML from an HTTP network call I get the error:

    XmlDataModel: Analysis of the file error... /... /.. /Data/model.XML on line 14, column 8: "unexpected character.

    After the end of the XML file, given the location of the character of line 14, column 8 is that it really confused me.

    Any thoughts on how to bypass this?

    The XML file can be found at https://developer.blackberry.com/cascades/files/documentation/device_platform/networking/model.xml

    try changing the url https://developer.blackberry.com/cascades/files/documentation/device_platform/networking/model.xml

  • Get the SQL statement error programmatically

    Hello

    error SQL in the FORMS, you can display the erroneous SQL statement pressing (shift) (Ctrl) E on the screen. Is there a way to get the text of the SQL statement in a PL/SQL function for logging purposes?

    I get the error using SQLERRM, it's not a problem. But how can I get the SQL text of the statement?

    Thanks and regards,

    Sascha

    Sascha,

    You should be able to use the: SYSTEM. System LAST_QUERY variable forms.

    Craig...

Maybe you are looking for