What is undo statement  in oracle

hi,
i`m not clear idea about undo statement,

There is no undo statement in SQL but Oracle manages undo data.
However some views related to LogMiner and Flashback features display an undo statement: in this case the undo statement is the SQL statement that should be run to undo the original SQL statement. See for example UNDO_SQL column in FLASHBACK_TRANSACTION_QUERY view http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4186.htm#i1628130.
Edited by: P. Forstmann on 12 févr. 2011 09:47

Similar Messages

  • Adding a field to an sql statement in Oracle Reports error ORA-00933

    We have been requested to add a field that already exists in the table referred to by the sql statement in Oracle Reports Builder. The report was set up by a consultant about 3 yrs ago and we don't really have much skill in this area. What is happening when I try to modify the SQL statement, either adding a field or deleting a field to the SELECT statement, causes an error message preventing the statement from being saved. The only way out of the error message is to click Cancel. The error message is
    ORA-00933:SQL command not properly ended
    ORDER BY Program ==> NAME
    Even adding or deleting a space anywhere in the SQL statement causes the error (not adding any new fields). A coworker found that if we comment out the ORDER BY, the statement will accept the new field in the SELECT section, however then we lose the order by functionality. I would like to add one additional field before the FROM. Not sure if any additional data are needed. Thank you.
    SELECT p.person_uid PIDM_KEY, p.id_number ID,
                   p.full_name_lfmi name,            
                    p.BIRTH_DATE, p.GENDER Sex,
                    Decode(a.residency,'D',p.Primary_ethnicity,'F')  Ethn,
                    a.academic_period TERM,        
                    CASE WHEN :p_group_by = 'PROGRAM' THEN a.program
                                 ELSE ' '
                    END AS Program,
                    a.COLLEGE, a.degree, a.major, ' ' rule,
                    a.STUDENT_POPULATION,a.STUDENT_LEVEL,    a.application_status Status,  a.application_status_date app_sts_dte,
                    ad.decision_date1 Last_Dec_Date,
                    ad.decision1||' '||ad.decision2||' '|| ad.decision3||' '|| ad.decision4||' '|| ad.decision5 Decisions,
                    /*  Deposit Date uses the last term entered in :p_term parameter string */
                    (SELECT MAX(deposit_effective_date) FROM usf_as_deposit WHERE account_uid = a.person_uid &term_clause group by account_uid)   AS "DEPOSIT DATE",     
                    ph.phone as PHONE,
                    CASE WHEN PS.FIRST_CONTACT IN ('NET','PAP','COM','COP') THEN PS.First_Contact
                     ELSE CASE WHEN ps.latest_contact IN ('NET','PAP','COM','COP') THEN PS.Latest_Contact
                                ELSE '  '
                                END
                    END AS FIRST_CONTACT,
                    DECODE(:p_address,'Y',REPLACE(adr.street1||' '||adr.street2||' '||adr.street3||' '||adr.city||','||adr.state||' '||adr.nation||' '||adr.zip,'  ',' '),' ') as  address, adr.nation, adr.state,
                    goremal_email_address email, a.residency, a.application_date, p.primary_ethnicity, c.cohort
    FROM MST_ADMISSIONS_APPLICATION A,
               MST_PERSON p,mst_pre_student PS,  Admissions_Cohort c, usf_v_phone_pr_ma ph,
               MST_admissions_decision_slot AD, usf_v_email, usf_v_address_dr_lr_ma_pr adr
    WHERE a.PERSON_UID = p.person_uid
            AND a.curriculum_priority  = 1
            AND a.person_uid = ps.person_uid
           AND a.person_uid = ad.person_Uid(+)
           AND a.person_uid = goremal_pidm(+)
           AND a.person_uid = adr.pidm(+)
           AND a.person_uid = ph.pidm(+)
           AND ph.rnum(+) = 1
           AND a.person_uid = c.person_uid(+)
           AND a.academic_period = c.academic_period(+)
      &Where_Clause
           /*    TAKE OUT FOLLOWING LINE AFTER DATA IS CLEANED UP  */
            AND NOT(p.id_number = '00000000'   OR SUBSTR(p.id_number,1,1) = 'B'  OR UPPER(p.full_name_lfmi)  LIKE '%TESTING%')
           AND  a.application_status_date >= NVL(:p_as_of_date,sysdate-8000)
           AND a.academic_period = ad.academic_period(+)
            AND a.application_number = ad.application_number(+)
            AND a.degree <> 'ND'    /*   AND a.college <> 'LW'                         --  Does not need non-degree and law students    */
           &Cohort_Clause 
    ORDER BY Program  &ORDER_CLAUSE

    Hi Denis,
    I tried your suggestion. The good thing is that adding the comma allowed me to be able to add a.campus to the select statement, unfortunately, another error message happened.
    ORA-00936: missing expression SELECT p . person_uid PIDM_KEY ,
    p . id_number , p . full_name_lfmi name , p . BIRTH_DATE , p . GENDER Sex ,
    Decode ( a . residency , 'D' , p . Primary_Ethnicity , 'F' ) Ethn , a . academic_period TERM ,
    CASE WHEN : P_group_by = 'PROGRAM THEN a I started over and tried only putting in the comma and get the same message even though I didn't add campus. After that, removed the comma which led to the ORA-00933 error message. So once again, I had to close the file without saving, in order for the report to run at all.

  • Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170:

    Hi all,
    I have an Windows XP OS with SP3.
    I have installed the Oracle 11g server.
    On trying to connect to the ODBC connection, i get the following error message:
    Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170: TNS: Connect timeout occured
    On trying the tnsping,
    TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 09-OCT-2
    011 13:11:05
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    E:\app\Gautam\product\11.1.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
    5.207)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))
    TNS-12535: TNS:operation timed out
    On trying to connect with SQL Developer, i get the following error:
    Status: Failure - Test failed: Io Exception: The Network Adapter could not establish the connection
    However i am able to connect to the same using SQL Plus
    Another issue that occurs is that the Oracle Enterprise Manager shows the following error after a while:
    Agent Connection to Instance
    Status Failed
    Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
    The following services are all up during this point of time:
    OracleDBConsoleorcl
    OracleOraDb11g_home1TNSListener
    OracleServiceORCL
    Any help in this regard will be very useful as this is hindering the progress of my work.
    Thanks in advance for the help.
    - Gautam

    841683 wrote:
    Hi,
    I did try and delete my listener.ora and then create a new one..
    That did not solve my issue..
    What are the steps for configuring the listener again.
    Thanks for the response..
    - Gautamno listener.ora file is required.
    just do as below
    lsnrctl start

  • Difference B/w all DDL statements in Oracle 8i and 9i

    Where can i get the difference between all the DDL statements between oracle 8i and 9i.If anyone has this pls ..post it..

    What is your national character set? What is NLS_LENGTH_SEMANTICS set to?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Need help converting Excel IF statement into CASE WHEN statement for Oracle

    Hi,
    Hope someone can help I have tried various ways of getting this to work, to no avail!
    Bascially I have some figures that are minus figures, and I need to add them together to get a movement figure, but I need to treat the minus figures as minus, if that makes sense, rather than the usual... a minus and a minus makes a plus.
    For example:- Budget Figure = -1% and Actual Figure = -68% so the movement needs to be -69%.
    The IF statement I have been using in Excel is the following:-
    =IF(FO110<0,(FP110-(IF(FO110=0,1,FO110)*-1)),FP110-IF(FO110=0,1,FO110))
    Which when using the figures as above = -69%
    Cell FO = The Budget Figure
    Cell FP = The Actual Figure
    However, when I created the CASE statement in Oracle, the figure in the query comes back as -0.67, which is oviously not what I want to happen when both actual and budget are minus figures; however when they are a minus and a plus, it works perfectly fine.
    Any help on this would be most appreciated!
    Kind regards,
    Annmarie

    Happy I did'n mess something up :)
    Nevertheless, don't show it too much around because
    case when budget < 0
         then actual - case when budget = 0  /* will never happen */
                            then 1           /* will never happen */
                            else budget
                       end * (-1)            /* -budget * (-1) remains only */
         else actual - case when budget = 0
                            then 1
                            else budget
                       end
    endso at least try the following (if case is more readable as decode for you). Let's hope it works as I don't have a Database at hand
    case when budget < 0
         then actual + budget
         else actual - case when budget = 0
                            then 1
                            else budget
                       end
    end Regards
    Etbin

  • Maintaining persistent client state in Oracle 8.1.6

    I'm running Oracle 8.1.6 on Windows NT 4.0.
    What are the methods to maintain the state of HTTP session (variable values, maybe transaction state) between the requests of the same user, in other words, how can I maintain HTTP session state in Oracle 8.1.6?
    It's preferable to avoid using cookie, but I'll be very grateful for any advice.
    Thanks in advance, Alex.

    Here's my Javascript Code for writing the Cookie (adapted from www.webmonkey.com):
    Htp.p('<script language="JavaScript"><!--
    function SetCookie(){
    if(document.cookie=="")
    {var t_ck="cotavalor=p_cliente:'&#0124; &#0124;to_char(t_new_CV_Cookie,'9999999999')&#0124; &#0124;'";var t_date=new Date("December 31, 2050");var t_ck_date=t_date.toGMTString();
    t_ck=t_ck+";expires="+t_ck_date+";path=/";
    document.cookie=the_cookie;}
    else {return false;}}
    //--></script>
    <script language="JavaScript"><!--
    SetCookie()
    //--></script>');
    Now here's my PL/SQL code for reading it:
    t_cookie := owa_cookie.get('cotavalor');
    Simple. I had to write that Javascript cause the Functions provided by Oracle didn't seem to work at all, while the Javascript version works easily.
    null

  • Can anyone kindly explain what mutative triggers are in Oracle?

    hi
    Can anyone kindly explain what mutative triggers are in Oracle with example?
    what is frag in oracle?

    Oracle raises the mutating table error to protect you from building in-deterministic software.
    Let’s explain that with a very simple example. Here’s a simple EMP-table:
    ENAME      SAL
    ======     ====
    SMITH      6000
    JONES      4000Let’s suppose you have a business rule that dictates that the average salary is not allowed to exceed 5000. Which is true for above EMP-table (avg. SAL is exactly 5000).
    And you have (erroneously) built after-row triggers (insert and update) to verify this business rule. In your row trigger you compute the average salary, check it’s value and if it’s more than 5000 you raise an application error.
    Now you issue following DML-statement, to increase the salary of employees earning less than the average salary, and to decrease the salary of employees earning more than the average salary.
    Update EMP
    Set SAL = SAL + ((select avg(SAL) from EMP) – SAL)/2;The end result of this update is:
    ENAME      SAL
    ======     ====
    SMITH      5500
    JONES      4500Note that the business rule is still OK: the average salary still doesn’t exceed 5000. But what happens inside your row-trigger, that has a query on the EMP-table?
    Let’s assume the rows are changed in the order I displayed them above. The first time your row trigger fires it sees this table:
    ENAME      SAL
    ======     ====
    SMITH      5500
    JONES      4000The row trigger computes the average and sees that it is not more than 5000, so it does not raise the application error. The second time your row trigger fires it sees the end result.
    ENAME      SAL
    ======     ====
    SMITH      5500
    JONES      4500For which we already concluded that the row-trigger will not raise the application error.
    But what happens if Oracle in it’s infinite wisdom decides to process the rows in the other order? The first time your row trigger executes it sees this table:
    ENAME      SAL
    ======     ====
    SMITH      6000
    JONES      4500And now the row-trigger concludes that the average salary exceeds 5000 and your code raises the application error.
    Presto. You have just implemented indeterministic software. Sometimes it will work, and sometimes it will not work.
    Why? Because you are seeing an intermediate snapshot of the EMP-table, that you really should not be seeing (that is: querying).
    This is why Oracle prevents you from querying the table that is currently being mutated inside row-triggers (i.e. DML is executed against it).
    It’s just to protect you against yourself.
    (PS1. Note that this issue doesn't happen inside statement-triggers)
    (PS2. This also shows that mutating table error is really only relevant when DML-statements affect more that one row.)
    Edited by: Toon Koppelaars on Apr 26, 2010 11:29 AM

  • Web application session state in Oracle

    In .Net 2.0, it is possible to store session states of web applications in other databases than SQL Server. Does any one have stored session state in Oracle? What should be done?
    Thanks

    For best results, try posting this to the ODP.NET discussion forum.

  • What is plsql file in oracle

    what is plsql file in oracle

    Hi,
    user626892 wrote:
    what is plsql file in oracle"PL/SQL file" is not a standard term. If you read something that you don't understand, post the entire paragraph (or a link) here.
    PL/SQL code is often entered by running a script (a text file containing, for example, a CREATE PROCEDURE statement) from SQL*Plus or some other front-end program.

  • Whats the Approx. plan for Oracle 11g2 64-bit release plan?

    Hi,
    I am looking for Oracle 10g2 for Win 7 64-bit but do not have any choice except to wait for 11g2 64-bit release.
    I looked at the other similar thread but didn't find any date.
    Re: What is the plan for 64-bit Windows?
    Can anybody tell me the approx. date of release for 11g2 with Win 7 64-bit support?
    Thanks,
    Jignesh

    > Question is which does SAP ECC 6.0 support ( or recommend ) Oracle 64 bit Dedicated or Shared Server db migration ?
    Never heard that anyone uses shared Server Setup with SAP.
    With SAP, it is NOT the user having a DB connection.
    It is the workprocess, and it is keeping it even if all users are idle.
    You allways have dedicated Oracle processes for SAP Workprocesses.
    The rather old note 70197 states, that Oracle MTS (multi threaded server)
    allowed, but you are on your own to configure it and there are some pitfalls.
    Volker

  • What Modules are bundled with Oracle 11.03 Financials?

    I have a client that has 11.0.3 financials installed. They are only using GL, and AP. My question is, what modules were bundled with Oracle Financials in 1999. Do they license to the PO module? I know it was part of the FastForward Financials product. However, I can not find documentation for the standard product. Their license agreement on states Oracle Financials.

    I believe that Procurement was not part of Financials, just AR, AR, FA, GL, and I think CE.

  • The status and statement about Oracle embrace JavaServer Faces

    Hi all:
    Have any expert could talking about the status and statement about Oracle embrace JavaServer Faces standard,
    whether Jdeveloper 10g have full support this standard now, and UIX direction ?

    development based on oracle technology and tool, If we wish adopt JavaServerFace technology, we should direct using Sun Java standard library or oracle UIX technology,
    give us some suggestion, how to start JavaServerFace application development ? is start from UIX ? and what is learning step ?

  • What is the Diffrence between Oracle 11 and 11i

    What is the Diffrence between Oracle 11 and Oracle11i ?.
    With Rgds
    Arun J.Isaac

    Oracle 11i is internet based and run with java platform where we can see the applets downloading alongwith oracle forms and it refreshes all the jar files in oracle default directory.
    Oracle 11 is not intergrated with Java its an Oracle standalone platform.
    Regards,
    Arumugam S.

  • Case Statement in Oracle Query.

    Hello Oracle Gurus,
    I need suggestion on whether I should use Case statement in Oracle queries.
    I have a sql statement which inserts the data by selecting data from other table. While selecting the data I have put a logic in the select statement for one column which is something like this and there are some more similar statements in the same query.
    CASE
                   WHEN (b.ACCOUNT = 'FIN' or b.ACCOUNT ='FIN ACC' or b.ACCOUNT like '%Global Eq%' or b.ACCOUNT like '%Flexible Bond%')
                   THEN
                        'MTM'
                             WHEN (substr(a.CTC,-3)='MTM')
                   THEN
                        'MTM'
                             WHEN (substr(a.CTC,-3)='AFS' or substr(a.CTC,-3)='HTM' OR substr(a.CTC,-3)='ACC' OR substr(a.CTC,-3)='HFI' )
                   THEN
                        'ACC'
                   ELSE
                                  'OTH'
              END,
    I wanted to get an suggestion about how much performance issue can I have due to this in my insert statement.
    Let me know if you need any other information.All comments are really appreciated.

    Hi,
    It's depends on the joins how you have performed with source table, stats and existing of indexes. If the volume of data is high - in case of any performance issue - why can't you perform the required things of logical conditions of data and popualte in one cluster so - that you can fetch out the chunks of required information with better way and in support with indexes.
    Let us know the ful query your working on
    Oracle version
    Explain plans - get it from dbms_xplan.
    - Pavan Kumar N
    - ORACLE - 9i/10g - OCP
    RHCE - Enterprize Linux 5.4

  • What is the password for 'oracle' user created during XE installation?

    Hi,
    What is the password for 'oracle' user automatically created when XE is installed?
    I installed XE on Linux and it's created under 'oracle' user, but I don't know 'oracle' password. So, I cannot stop TNS listener.
    During configuration, it prompted me to enter SYS and SYSADMIN password but it didn't ask me to enter 'oracle' user password.
    Please let me know or point me to the document.
    Thanks,
    N

    Hi Jari,
    I tried your suggestion, but it didn't work unfortunately.
    When I type (sudo su -oracle) as follows, it still prompts the password. When I hit Enter key w/o anything, it seems to proceed and the prompt shows up in the following line. So, I thought it was successful, but when I checked 'whoami', it's not logged in as 'oracle'.
    So, I created the password for 'oracle' and logged in as 'oracle' using a new password. Then, I stopped TNS listener to uninstall XE.
    It would be nice if it's documented in XE document somewhere... since it's created by XE installation, I assumed some kind of default password was used.
    Thanks,
    N

Maybe you are looking for

  • Ical broken help?

    ical will open with month calendar populated but can't click on any item and can't move between weekly, daily or monthly view. After opening the only active function is quit ical. Any suggestions?

  • Column View in OSX Lion

    Does anybody know what happened to the thumbnail view in the last column of the finder with OSX Lion? Here's a screenshot of what it looks like now. The top file is highlighted and the last column is blank now. I used to be able to view the document

  • Copy & paste from photobucket all from the droid x .

    I can copy a video from my photobucket acct ,But cant paste it to a forums i go to from the field of hunting .I take the video send it to my bucket acct .Copy it from photobucket ,but cant paste it to forums . How do i attempt this .

  • Scratch disk is full on Photoshop CS6 but I can't close Photoshop as I would lose all of the work I've done.

    I've been working on a drawing for awhile and a little error message popped up saying my scratch disks are full. I've tried multiple things but I apparently need to restart Photoshop for those things to kick in. I can't restart it as almost all of my

  • HT5534 I updated iWork 09 and it won't open

    I updated Keynote Pages and Numbers because I was told to by my automatic updates. MacBook Pro late 2011 model running OSX Maverick 10.9 Both versions are on here. Old versions run but the 2013 versions of all 3 crash before they even open. Why?