Question about correctly EXIT on SQL Script

Hi there,
I have created a SQL script, every time when the raise_application error appears then of course the PL/SQL block ends but then still the external sql script is being executed, how can I prevent the External sql script from being executed after a raise application error is displayed?
Regards
RobH
DECLARE
BEGIN
IF start_date > stop_date
THEN
raise_application_error (-020110,
'Start Date can not be greater Stop Date. '
ELSE ..... do some selecting and inserting of data into temporary tables etc...
END IF;
END;
--And now a external SQL script should be started...
@c:\reports\test.sql

you can trap your exception in the inner block using EXCEPTION block and from there propagate it to the external block to stop further processing. something like this...
DECLARE
  l_deptno NUMBER;
BEGIN
  FOR i IN (SELECT deptno FROM dept)
  LOOP
    BEGIN
      FOR j IN (SELECT empno, ename FROM emp WHERE deptno = i.deptno)
      LOOP
        IF ( i.deptno = 20 ) THEN
          RAISE_APPLICATION_ERROR(-20001, 'Error Raised');
        ELSE
          DBMS_OUTPUT.PUT_LINE('Dept = ' || i.deptno || ' EmpNo: ' || j.empno || ' EName: ' || j.ename);
        END IF;
      END LOOP;
    EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Error Trapped Inside');
        RAISE;
    END;
  END LOOP;
EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Error Trapped Outside');
END;
SQL> /
Dept = 10 EmpNo: 7782 EName: CLARK
Dept = 10 EmpNo: 7839 EName: KING
Dept = 10 EmpNo: 7934 EName: MILLER
Error Trapped Inside
Error Trapped Outside
PL/SQL procedure successfully completed.

Similar Messages

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • Exiting from SQL script

    Hi,
    How do you exit from an sql script?
    e.g
    DECLARE
    VAR1 = VARCHAR2(10);
    VAR2 = VARCHAR2(10);
    BEGIN
    VAR1 := 'hello';
    VAR2 := 'world';
    IF VAR1 != VAR2
    THEN
    DBMS_OUTPUT.PUT_LINE('Variables not equal');
    ## Exit here! <------- HOW?????
    END IF;
    END;
    Cheers,
    Warren

    If I understand correctly, you have a series of anonymous PL/SQL blocks in a script. If some test fails in one of them, then you do not want to run the rest of the script.
    If exiting sqlplus is an acceptable means of failing, then you can do something like:
    WHENEVER SQLERROR EXIT 1;
    DECLARE
    v1 VARCHAR2(20);
    v2 VARCHAR2(20);
    BEGIN
       v1 := 'ABCDE';
       v2 := 'FBCDE';
       IF v1 <> v2 THEN
          DBMS_OUTPUT.Put_Line('Variables Not Equal');
          RAISE NO_DATA_FOUND;
       END IF;
    END;
    DECLARE
    v3 VARCHAR2(20);
    BEGIN
       v3 := 'Second Block';
    END;
    /in your script. As shown, the script will exit sqlplus without executing the second block. You can use any sql error instead of no data found.
    Another possibility if exiting sqlplus is not acceptable would be to do something like this in your script:
    VARIABLE failed NUMBER;
    DECLARE
    v1 VARCHAR2(20);
    v2 VARCHAR2(20);
    BEGIN
       :failed := 0;
       v1 := 'ABCDE';
       v2 := 'FBCDE';
       IF v1 <> v2 THEN
          DBMS_OUTPUT.Put_Line('Variables Not Equal');
          :failed := 1;
          RETURN;
       END IF;
    END;
    DECLARE
    v3 VARCHAR2(20);
    BEGIN
       IF :failed = 0 THEN
          v3 := 'Second Block';
       END IF;
    END;
    /Note, the IF :failed = 0/END IF block should cover all the code in each subsequent anonymous block.
    A third approach would be to re-write the series of anonymous blocks as a package, then create a small driver script to call each procedure in turn unless one returns an error.
    TTFN
    John

  • A question about User Exits(EXIT_SAPLRRS0_001)

    Hi,
    i have a question about EXIT_SAPLRRS0_001.
    In this case i want to get a start date of the quarter(Z0DD1) during 2 variables (year 'ZAYEAR1' and quarter 'ZAQTR1'), which are given in a POP-UP Dialog. The following codes:
    CASE i_vnam.
        WHEN 'ZODD1'.
          IF i_step EQ '2'.
            CLEAR: l_s_range.
            READ TABLE I_T_VAR_RANGE INTO i_s_var_range WITH KEY vnam = 'ZAYEAR1'.
            IF sy-subrc EQ 0.
              l_var_year = i_s_var_range-low.
            ENDIF.
            READ TABLE I_T_VAR_RANGE INTO i_s_var_range WITH KEY vnam = 'ZAQTR1'.
            IF sy-subrc EQ 0.
              l_var_quarter = i_s_var_range-low.
            ENDIF.
    *==================start date of the quarter===============
            CALL FUNCTION 'Z_0000_QUARTER_S'
              EXPORTING
                VA_APPLE_QUARTER   = l_var_quarter
                VA_APPLE_YEAR      = l_var_year
              IMPORTING
                VA_APPLE_QUARTER_S = l_var_quarter_s.
            clear l_s_range.
            l_s_range-low = l_var_quarter_s.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
          ENDIF.
      ENDCASE.
    Please help me to check if this program is right?
    I have made a debugging, but i do not understand, why this program runs 3 time with I_STEP from 0 to 3. In fact I need only the data with I_STEP = 2.
    Addtionally i want to know if the tabel e_t_range will provide the returned value (ZODD1) ?
    THANKS A LOT.

    THanks your replies!
    I would like to know if the e_t_range provides the returned value (In this program i want to get the value of ZODD1)?
    IF yes, in I_STEP = 2 e_t_range save the right value for ZODD1. But this program run one time again--- I_STEP=3, at this time e_t_range hat not any value, that means if i will not get the value for ZODD1?
    THANKS.

  • Question about B1if-Database in SQL-Mgmt-Studio

    Hello,
    We have made some changes in the configuration in SLD.
    We made some more Di-Proxy-Ports and then made Proxygroups for the Databases.
    Nearly every half hour, in SQL-Mgmt Studio we can see this "task" ?
    During the time, this task is online, the Queue-Monitor collects all Jobs... but not more.
    After this Job has finished... B1i begins to work up the jobs.
    Can anyone tell me something about "Rollback Transac" in  B1if-Database ?
    Thanks
    Markus

    Passing the exam and becoming certified are not a matter of simply reading a book or taking a training class. While books and classroom materials as well as in-class training are all important steps in preparing for an exam, experience and research are just as important. I cannot tell you that there are 53 questions on the exam and every single question maps directly back to page 13, paragraph 3 in XX book. However, If you have the classroom material, and you have the list of exam topics, you should be able to find most of the information you need. In some cases, if you are not completely familiar with a specific topic, or you don't feel like the information in the book gives you all the information you need, you may need to do a little additional research. This is all part of preparing for an exam. This process is what makes you successful as a certified professional.
    Your focus seems to be solely on the course materials that you have and what volumes and chapters you should read. I'm trying to give you a different perspective - preparing for an exam is not necessarily about taking one course or reading one book and being ready. You need to review the exam topics and be sure that you are familiar with each topic.
    Regards,
    Brandye Barrington

  • Question about having a master sql scrpit/file that calls other sql files

    I know that in SQL Plus, the following works:
    master.sql:
    @script1.sql
    @script2.sql
    @scriptn.sql
    My problem is, I'm using the sql maven plugin and the jdbc driver doesn't seem to like the @script.sql syntax. So the question is two-fold. Is it possible to get this master script behavior using the jdbc driver and not SQL Plus. Second, is the @script.sql syntax, specific to SQL Plus?
    Thanks!
    Justin

    The @<<script>> syntax is specific to SQL*Plus. I'm not familiar with the "sql maven plugin", so I have no idea whether it has some analogous syntax for calling scripts in other files or not. The JDBC API works just with SQL statements, not scripts, so whatever application (I'm guessing SQL Maven?) that is using the JDBC driver has to interpret the @<<script>> syntax.
    Justin

  • Question about using objects in SQL query.

    I had posted this question in the SQL/PLSQL forum but I guess nobody took the time to understand exactly what I am asking so I decided to try here hoping to get the answer. So here is the thing:
    I have created generic object type "tree" - the constructor takes as a parameter sql query which returns "node_id" and "parent_node_id" - this is all we need to have a tree. The object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Not exactly sure what the question is...
    As I understand, you are comparing the following two constructor calls:
    +select..  tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") ... FROM ...+
    +select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') ... FROM dual+
    These calls are the same (besides the 1st one doing an immediate implicit call to a method of the object being constructed). The number of times these are being called depends on the number of times this SQL projection is applied - and that is determined by the number of rows being projected by the SELECT.
    The latter one is against DUAL which only has a single row. So that constructor is only called once. The former can be against multiple rows. Obviously a single pass through a data set is desirable - which means that the sub-select (use by the constructor) should ideally only be executed once and makes the 2nd method more desirable.
    However, I'm having a hard time understanding why the class and constructor are at all needed. Why pull data from a SQL table into PL memory? As that is where the class will need to cache and store the results of that construction parameter SQL SELECT. And once in PL memory, how does the object effectively access, search and use this cached data?
    PL memory is expensive. It is not sharable.
    PL data structures are primitive - these cannot be compared to SQL structures in the form of tables and columns that can be stored in a number of physical ways (index tables, hash tables, partitioned tables, clustered tables, etc). Cannot be indexed like SQL structures using B+tree, bitmap, function and other indexing methods. Cannot be sorted, grouped, analysed, filtered, etc like SQL structured data.
    It makes very little sense to read SQL data into a class and then deal with that data, cached in expensive PL memory, using primitive PL structures.
    And the same would be true if Java or C# was used. The best place for data is inside the SQL engine. That is the most superior environment for data. It can processes more data, scale better, perform better and offer more flexibility, than pulling data from it and then crunch that data using PL or Java or C#.

  • Question about Correcting Errors in the Converted Model

    Hi,
    I've used SQL Developer (v1.5.1) to capture (offline) the DDL from a Sybase 12 DB and have converted this to Oracle, which all seemed to run ok. However, I noticed some errors in the Migration Log. None of them have the prefix 'Parse Exception' so, according to the online help, no manual intervention is required to resolve them.
    I don't even know if the contents of the migration log are a problem, generally they can be grouped under one of the three headings below.
    "*Multiple Limitations for Stored Procedure* extUpdateExtSuccess 03-SEP-08-16:09:41"
    "*Translation limitation* '@@ERROR' encountered on Stored Procedure CorporateActions.dbo.extBMDeleteBatchSchedule line 14 column 4 03-SEP-08-14:53:23"
    "*Index* 'XPKSpinOffExt' on table 'SpinOffExt' *has been dropped as it is a duplicate of a constraint* 03-SEP-08-14:39:26"
    Are these errors something I need to do something about before I try generating the DDL? Are they related to Sybase (which I know very little about).
    Online help is not very helpful on this subject.
    Thanks,
    Antony

    Hi, Hareesh
    I agree. But that is how it is defined now by someone else. It is hard to change it as he defines the same structure on the receiving side. I didn't want to change the receiving structure as it touches the proxy code too. So I want to make something short and sweet.
    Basically the data looks like this:
    11,222
    55,666
    The result xml should be something like:
    <JOB>
      <Msg>
         <Transaction>
            <DATA>
               11
               222
            </DATA>
         </Transaction>
         <Transaction>
            <DATA>
              55
              666
            </DATA>
          </Transaction>
      </MSG>
    </JOB>
    I know either the DATA has no meaning and it's giving me a headache ... but that's how it's done and I don't want to rock the boat too much. There are lots of mapping that I have changed otherwise.
    Thanks,
    Jonathan.

  • Another question about using objects in SQL queries

    Hi gurus, I need your thoughts on this:
    I have created generic object type "tree" - the constructor takes as a parameter sql query returning "node_id" and "parent_node_id". As a tree - the object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Hi, TREE is not a function but PL/SQL object type I have written representing tree structure. The Oracle version is 10g.

  • I have a question about ' correct for aspect ratio'

    I have recently completed a wedding video, and the bride and her family have expressed disappointment that my footage make them ' look like a group of dwarves....  small and fat'.
    My initial reaction to this was to say there is nothing I can do about their shape, however I did agree to investigate further. I have checked my cameras to ensure that I am filming in 4:3 aspect ratio.
    I have noted tonight however that final cut (I use Final Cut Express 4.0.1) has a tool that allows you to 'correct for aspect ratio'. I cannot find reference to this in the user manual (although I am sure it is there). When I apply this to any clips, it does appear to stretch the images upwards/ vertical.
    Should I be using this all times before editing?
    Is this perhaps the cuase of the dwarf effect on the final footage? I have never had any complaints before.
    Any help or experience would be appreciated.

    Here is a screen shot of the clip properties. Pixel aspect is PAL- CCIR 601.

  • Question about correct use of WM_CONCAT

    Good morning,
    I'm trying to accomplish the following:
    starting with this
         ENAME
         ADAMS
         ALLEN
         BLAKE
    ...and ending with this
         OLD_NAME   NEW_NAME
         ADAMS      AADMS
         ALLEN      AELLN
         BLAKE      ABEKL
    ...basically, alphabetically sorting the characters inside each name. I have an intermediate step that looks promising
    select e.ename oldname, substr(e.ename, iter.pos, 1) newcharpos
      from emp e,
           (select rownum pos from emp) iter
    where iter.pos <= length(e.ename)
    order by e.ename, substr(e.ename, iter.pos, 1);The above yields
    OLDNAME    NEWCHARPOS
    ADAMS      A
    ADAMS      A
    ADAMS      D
    ADAMS      M
    ADAMS      S
    ALLEN      A
    ALLEN      E
    ALLEN      L
    ALLEN      L
    ALLEN      N
    BLAKE      A
    BLAKE      B
    BLAKE      E
    BLAKE      K
    BLAKE      L
    ...the individual characters are in the right sequence, I figured all I had to do was to use WM_CONCAT (and replace the comma it inserts with the empty string) and I'd be done. I figured this would do it: (replace of comma left out for clarity)
    select oldname,
           wm_concat(newcharpos) newname
      from (
            select e.ename oldname, substr(e.ename, iter.pos, 1) newcharpos
              from emp e,
                   (select rownum pos from emp) iter
             where iter.pos <= length(e.ename)
             order by e.ename, substr(e.ename, iter.pos, 1)
      group by oldname;but the sequence of newcharpos gets messed up in the process and, instead of the expected result, I get this:
    OLDNAME    NEWNAME
    ADAMS      A,S,M,D,A
    ALLEN      A,N,L,L,E
    BLAKE      A,L,K,E,B
    ...My question is, how do I structure the last query so the character order stays as calculated in the inner query ?
    Thank you for your help,
    John.

    Or
    SQL> select   oldname,
           wm_concat(newcharpos) keep (dense_rank last order by null)  newname
      from (
            select e.ename oldname, substr(e.ename, iter.pos, 1) newcharpos
              from emp e,
                   (select rownum pos from emp) iter
             where iter.pos <= length(e.ename)
             order by e.ename, substr(e.ename, iter.pos, 1)
      group by oldname
    OLDNAME    NEWNAME                      
    ADAMS      A,A,D,M,S                    
    ALLEN      A,E,L,L,N                    
    BLAKE      A,B,E,K,L                    
    CLARK      A,C,K,L,R                    
    FORD       D,F,O,R                      
    JAMES      A,E,J,M,S                    
    JONES      E,J,N,O,S                    
    KING       G,I,K,N                      
    MARTIN     A,I,M,N,R,T                  
    MILLER     E,I,L,L,M,R                  
    SCOTT      C,O,S,T,T                    
    SMITH      H,I,M,S,T                    
    TURNER     E,N,R,R,T,U                  
    WARD       A,D,R,W                      
    14 rows selected.Or (11gR2)
    SQL> select ename oldname, column_value newname
      from emp,
           xmltable(('string-join(for $i in (' || rtrim(regexp_replace(ename, '(.)', '"\1",'),',') || ') order by $i return $i, "")'))
    OLDNAME    NEWNAME                      
    SMITH      HIMST                        
    ALLEN      AELLN                        
    WARD       ADRW                         
    JONES      EJNOS                        
    MARTIN     AIMNRT                       
    BLAKE      ABEKL                        
    CLARK      ACKLR                        
    SCOTT      COSTT                        
    KING       GIKN                         
    TURNER     ENRRTU                       
    ADAMS      AADMS                        
    JAMES      AEJMS                        
    FORD       DFOR                         
    MILLER     EILLMR                       
    14 rows selected.

  • Question about 'direct' parameter in sql loader utility

    Hi eveyone,
    Today I was asked what the advantages and disadvantages of 'direct' parameter of sql loader.
    In my opinion, if swithing direct on, oracle use direct path load.
    And it has no difference from the append hind in insert statement.
    The core merits are less redo hence faster.
    The main shortcoming is since little redo generated, we have to ask DBA to back up the data according to the rules immediately after the loading.
    Does my answer make sense or not? Plesae help to point out the important things I missed.
    best regards,
    Leon

    Hi,
    Direct path Export is much faster than conventional path Export because the data is read from disk into the buffer cache and rows are transferred directly to the Export client.
    Some conditions to use DIRECT parameter are,
    1. The Export parameter BUFFER applies only to conventional path Exports. For direct path Export, use the RECORDLENGTH parameter to specify the size of the buffer that Export uses for writing to the export file.
    2. You cannot use direct path when exporting in tablespace mode (TRANSPORT_TABLESPACES=Y).
    3. The QUERY parameter cannot be specified in a direct path Export.
    Thanks

  • A question about field exit

    I have created a function module 'FIELD_EXIT_ABREX'.Can I use other field value  in this Function Module?How to implement it?

    Hi,
    Firstly decide the scope : Global or Local to screen.
    Global Field Exits are trigerred from all Screens whereas for Screen specific needs the screen to be specified when we go for activating it....
    Run program RSMODPRF and specify the field ...
    Note : Screen name & data element may be different...so u have to specify Data Element & not Screen field name. Just to remind as this is common pitfall.
    Now as u said 'FIELD_EXIT_ABREX' as the Func module created. This gets the screen value of field ABREX in variable INPUT of the Func Mod 'FIELD_EXIT_ABREX' and after processing u can return value throu variable OUTPUT.
    You can write u r validations in the FM and do whatever. Just remember the value are lost as soon as this Field Exit is triggerred Again
    I hope this should help you for further wwork and any other specific issue do post back ... we'll see dude.
    <b>Do reward if this was useful and adds to u r knowledge / solves issue</b>
    Regards,

  • A question about correct SEU in Virtex4 LX25 FPGA

    I have a problem when I scrube the DSP, IOB, CLK, CLB using the data stored in the Flash to correct the SEU in Virtex4 LX25 FPGA. This is my flow chart:
    step1: read the state register to verify the state register
    step2:  read the control register to verify the control register
    step3:  write a 32bit data to FAR register and read FAR register to virify the FAR register
    step4:  scrube the DSP, IOB, CLK, CLB logic in the Virtex4 LX25 FPGA using the data stored in the Flash(I shield the LUT RAM and SRL16).
    Problem: when the step4 is done, if I immediately implement the step1 the scrube programe can influence the CLB logic. But when the step4 is done, if I delay 0.1s to implement the step1 the scrube programe has no influence on CLB logic.
    Is this means that I should wait a minute when I begin the next scrube process? Thank you in advance. 
     

    Hi Lesea, Virtex4 is not supported by Soft Error Mitigation (SEM) Core, and I need to protect the Virtex4 LX25 FPGA by simple scrubbing. The configuration management engine I designed is the same as that in Correcting Single-Event Upsets in Virtex-4 FPGA Configuration Memory. I also do the fault injection experiment, and the configuration management engine can correct the faults in the Virtex4 LX25 FPGA.
    On my board: digital signal A---->encode---->D/A---->A/D---->decode---->digital signal B
    When I don't scrubbing the FPGA, the signal B is always the same as the signal A, so I think my board and the software in the FPGA operate well. When I scrubbing the FPGA too frequently, the signal B is not always the same as signal A(I only scrubbing the DSP, IOB, CLK, and CLB logic and I shield the LUT RAM and SRL16 logic). So I think the problem is caused by my configuration management engine.
    I also find that the time between two scrubbing process can not be too short. For instance, if I delay only several clks(2.3825MHz) before the next scrubbing process, the signal B is not always the same as the signal A. But if I delay 0.1s, 1s or 10s before the next scrubbing process, the signal B is always the same as the signal A. So how can I solve the problem? I can do experiment to find the minimal time between the two scrubbing process that have no influence on my software. I want to know what causes this problem. Thank you:)
    Regards,
    Zhiyuan Peng
     

  • Question about reconciliation, by using SQL statement

    Dear All,
    Does any know how to print out A/R invoice which are internally recon, by using SQL statement. It seems like GL report.
    For example:
    InvoiceNo                     Recon
    INV222000001              Yes
    INV222000002              No
    INV222000003              No
    From Samson

    Dear Samson,
    Please try this one:
    SELECT T0.DocNum AS 'Invoice No.',  CASE WHEN SUM(T1.IntrnMatch)=0 THEN 'NO' ELSE 'YES' END AS Recon
    FROM DBO.OINV T0
    INNER JOIN DBO.JDT1 T1 ON T1.TransId = T0.TransId
    WHERE T0.DocDate BETWEEN [%0\] AND [%1\]
    GROUP BY T0.DocNum
    Thanks,
    Gordon

Maybe you are looking for