Does oracle keep all past sql's?

is there a view or table that contains all sql statments executed against the database?
latest ones as well as old ones...
does the view get truncated after db reboot?

If by "all" you literally mean "all", no.
Depending on the version of Oracle (which you don't mention) as well as the edition and the management packs licensed, there is a good probability that all the SQL statements that have actually been executed for the past N days will be available in the AWR (Automatic Workload Repository) tables (where N is whatever you've configured your AWR retention to be). Depending on what you are trying to do, however, you may need to look at the ASH data as well.
Justin

Similar Messages

  • Does oracle support array in SQL?

    The follow syntax for postgresql works with good performance, does Oracle support? Thanks
    select
         r.company_code,
         r.date,
         r.d5[1] as d5_udm,
         r.d5[2] as d5_ddm,
         r.d5[3] as d5_tr,
    from (
         select
              q.company_code,
              q.date,
              (select array[avg(abs(highest_rate-opening_rate)), avg(abs(opening_rate-lowest_rate)), avg(highest_rate-lowest_rate)] from (select lowest_rate, highest_rate, opening_rate from hkex.quotation q1 where not q1.is_trade_suspend and q1.company_code=q.company_code and q1.date<=q.date order by q1.date desc limit 5) t) as d5
         from hkex.quotation q
         where not q.is_trade_suspend
    ) r;

    Hi,
    I'm not a postgresql exponent but the following query might work, though I haven't tested it.
    select
    r.company_code,
    r.date,
    udm as d5_udm,
    ddm as d5_ddm,
    tr as d5_tr,
    from (
    select
    q.company_code,
    q.date,
    (select avg(abs(highest_rate-opening_rate)) udm,
              avg(abs(opening_rate-lowest_rate)) ddm,
              avg(highest_rate-lowest_rate) tr
    from (select lowest_rate, highest_rate, opening_rate
            from hkex.quotation q1
            where not q1.is_trade_suspend = '0' -- as below
            and q1.company_code=q.company_code
            and q1.date<=q.date
            order by q1.date desc limit 5) t) as d5   -- not sure what limit 5 does (possibly first 5 rows?)
    from hkex.quotation q
    where q.is_trade_suspend = '0'  -- Oracle does not support boolean data type for columns so change col to varchar2(1) with '0' and '1' for false and true
    ) r;Andre
    Edited by: acadet on Mar 4, 2010 3:43 PM

  • App-v setup.exe /repair, does it keep all its settings?

    Hi,
    Quick question: when you deploy a App-v package with all its parameters (/INSTALLDIR etc) and you repair the install via setup.exe /repair, all its settings are kept, right?
    Please advise.
    J.
    Jan Hoedt

    What happens if you actually test that scenario in your own environment?
    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually
    answer your question). This can be beneficial to other community members reading the thread.
    This forum post is my own opinion and does not necessarily reflect the opinion or view of my employer, Microsoft, its employees, or other MVPs.
    Twitter:
    @stealthpuppy | Blog:
    stealthpuppy.com |
    The Definitive Guide to Delivering Microsoft Office with App-V

  • When I sync my iphone why does it keep all my old podcasts when I only wnat it to keep the ones on my computer?

    when I sync my iphone to my windows pc I only choose to sync podcasts that I have downloaded. I delete the ones I don't want etc on the computer.  but when I sync my iphone still keeps the old podcasts I no longer want.  anyone know why?  thanks

    On your iphone go to Settings>icloud and turn on the things you want to sync with your Mac.

  • My safari does not keep my history despite all the settings and adjustment i made to the safari preferences so as to be able to keep my browsing history. the browsing history is wiped out whenever i close safari.

    i use macbook pro mid 2012, OS X mavericks. my safari does not keep my history desp[ite all the adjustments made to the settings at safari preferences. my browsing history are cleared whenever i exit safari. i dont know why. i want to try and re - in stall it . the safari is version 7.0.1. but i dont know how.

    If you're having trouble making changes to files that are inside your home folder (represented by a house icon in the sidebar of a Finder window), or if you can't get changes to the settings of an application to stick, then please see below.
    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    I've tested these instructions only with the Safari web browser. If you use another browser, they may not work as described.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password dialog will open. You’re not going to reset a password.
    In the dialog, select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Does Oracle has features like Profiler in MS SQL

    Since I'm new to Oracle I would like to know from you guys does Oracle has the feature like that of Profiler like present in MS SQL. Since I need those services for my work so really like to know about it. I tried to find out that feature but couldn't. So please share your knowledge about it .
    Regards,
    Praveen Rai

    As someone who has actually used SQL Profiler I will add a few comments.
    There are two Oracle features that may be of interest when trying to duplicate SQL Profiler information.
    Niall mentioned the Oracle trace facility. Oracle is heavily instrumented and the internal measurements for how long individual operations executed and/or waited are available via the trace facility. It can be turned on by a session (several methods available) and it is also possible to turn trace on externally for an already running session.
    An experienced DBA may choose to work with the raw trace file but Oracle provides a utility trkprof which will format the trace file collecting the execution information (number of physical IO, Logical IO, and rows returned) by SQL statement.
    This kind of trace files are primary used for tuning purposes. Trace files can also be used to capture bug information via setting database events,
    You can find information on SQL trace in the Performance and tuning manual.
    Another feature that may be of interest is the Log Miner feature. This feature allows you to see the SQL in the online or archived redo logs. It is possible to generate SQL to back out changes that were applied.
    This reminds me of another feature that will allow you to see "recent" activity: flash back query. For as long as the information is retained in the undo segments it is possible to query all activity against a row or set of rows in a table.
    Again each of these features is documented in the standard documentation.
    Here is a link to an article on how to turn trace on for an already running session.
    How do I switch on sql trace in another session that is already running?
    http://www.jlcomp.demon.co.uk/faq/alien_trace.html
    HTH -- Mark D Powell --

  • My iPod 5th gen. doesn't have a back camera. Can I trade it in for one that does have a back camera? If I can, can I keep all my pictures and have them switched over to the other one?

    My iPod 5th gen. doesn't have a back camera. Can I trade it in for one that does have a back camera? If I can, can I keep all my pictures and have them switched over to the other one?

    If you purchased it from Apple within the last 14 days then you can return it for a full refund. otherwise no. If you purchased it elsewhere you have to check with them.
    Do this to transfer info
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • Analysis does not show all rows returned by SQL

    Hi.
    OBIEE 11.1.1.7.0
    I have a strange problem.  I have a simple table that should return customer number and sales.  The report will show all of the sales, but it does not show all the customer numbers.  The SQL that OBIEE creates does return all of the customer numbers.  When I remove the sales and just include the customer number, the report only shows a couple of the customer numbers (it should show several hundred).
    I guess what I'm looking for is any advice for how to debug this.  I have spent about 3 days on this problem, so I have tried to look at it from every angle (data, RPD, report).
    Any suggestions are appreciated.
    Thank you.

    Thank you for your reply.
    New development.  The issue has to do with a descriptor ID column.  The customer number column is a varchar field and I set the descriptor ID column to the column_ID field.  When I remove the descriptor ID setting, I received all custom numbers.

  • My ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    my ipod touch is stuck on the apple logo and after a while a white screen comes up and it restarts and the same thing all over agan. this happened to me before and after a while it turns on but why does it keep on doing this?

    Try connecting the iPod Touch to your computer and restore it.  http://support.apple.com/kb/HT1414

  • How do I copy and paste a shape (or layer) from one file to another keeping all of its attributes?

    Our department currently uses MS Paint to place varied colored boxes for callouts on top of screen figures used in our documentation. As you know, MS Paint is not a robust image editing application, and we are frustrated at its limitations (especially not having a "non-destructive" edit capability). Consequently, we are evaluating a trial version of PS to see how a workflow could be developed that would allow the department to use callout boxes "stored" in a PS file that could be applied in an easy, consistent manner to our screen figures (but also keep each callout box editable) using PS.
    Consequently, in PS using the shape tool, I created a file with our colored boxes for callouts, each on its own layer. Now I am trying to determine how you copy and paste a box (or layer) from this file to a "working" file (one containing a screen figure), while keeping all of its attributes (color, line weight, being editable, etc.). I can't seem to find an option to do this. Is there? If not, is there another workflow in PS that you can recommend for this type of procedure?

    Thanks - I used the Layer > Duplicate command and it worked great!
    P.S. How do you drag and drop a layer? I tried dragging a layer to the other open image, but nothing happened. Do you have to hold down a specific key for this (I'm using Windows)?

  • How do I keep format when copying a table to keynote? paste and match style does not keep format

    how do I keep format when copying a table to keynote? paste and match style does not keep format

    It used to work until recent updates and it is very frustrating.....I hope someone out there knows how to deal with this.

  • Does Oracle have Extended Stored Procedure like SQL Server and Sybase?

    Hi, i am new to Oracle. I want to know if...
    Does Oracle have Extended Stored Procedure like SQL Server and Sybase?
    If it does not have, then how can i call outside program written in C or JAVA from the Database stored procedure or trigger?

    refer to this link on external procedures
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76956/manproc.htm#11064

  • Why does ibooks keep telling me it can't connect to iTunes? I have purchased a book I can't download. All updates done, restarted, reinstalled...

    Why does ibooks keep telling me it can't connect to iTunes? I have purchased a book I can't download. All updates done, restarted, reinstalled...

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • What is native Sql data types and does oracle support this?

    what is native Sql data types
    Does oracle support this?

    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#g31099

  • Why does firefox keep blocking websites that I have gone to in the past

    Why does firefox keep blocking websites I have gone to in the past?

    From http://watchseries.lt/tips#htw
    <pre><blockquote>Why videos do not work for me?
    You need Flash Player or DivX Player. Both of these programs are used everywhere online; their size is small and will not harm your computer. You should download them from here:
    DivX: http://www.divx.com/en/software/download/start
    Flash: http://get.adobe.com/flashplayer/</blockquote></pre>

Maybe you are looking for

  • Question about synching gmail contacts with address book

    Hi, I recently discovered that it is possible to synch gmail contacts with apple addressbook. I also found out this feature only works if you have an iphone or an ipod touch. Unfortunatly, I don't have either. I then discovered there was a work aroun

  • Simplest was to make a calendar

    I am not sure if this is the right forum to ask this question, so don't flame me if I'm wrong. How can I make a simple calendar using iWorks '08 or iLife '08 with a photo, a title, and the actual calendar. I am not an artist, so if this is simple, do

  • Need to update my iphone 4 operation system

    Bought my iphone 4 in sept 2011...have not updated my operating system since then...I need to find out how to do that...

  • System Pref Icons To DOCK

    in tiger, i used to be able to drag any icon from the system preferences into my dock for quick access. how come i can't do this in leopard? does anyone know if there's a terminal hack that is needed now or is there just a new keyboard combo to drag

  • Error in BDC - screen 0000 is too large for internal batch input area

    Hi While I was running a BDC program for MR21  I am facing the following error after I enter 37 records. If I enter records less that 37 then upload was successful. I have even used OPTIONS in call transaction statement inorder to avoid dependancy on