How do i see the sql statements that are run ?

i want to see (in a log file) what are the sql statements that oracle had ran.
how do i do it ? what configurations should i do ? how ?
please help ... thanks

Current SQL statements are viewed in dynamic tables:
SELECT SCHEMANAME, SQL_ADDRESS, SQL_TEXT, last_call_et
FROM V$SESSION, V$SQLAREA
WHERE V$SESSION.SQL_ADDRESS=V$SQLAREA.ADDRESS
A historical log of all SQL statements is recorded in Oracle Archived Logs, and can be viewed using the Oracle Logminer approach. This process requires your database to be in ARCHIVELOG mode, and that Logminer be configured to read the archived logs.

Similar Messages

  • Find all the sql statements that are executed in a database

    Hi
    I would like to get all the sql statements that have been executed till now on the database. Also, i need the session and user details who has executed the statement.
    I know this can be done after enabling auditing.
    I would like to get the details without enabling the auditing option.
    I am using oracle 9i and oracle 10g.
    Regards,
    Vamsi

    You can use {noformat}{noformat} tags to preserve the SQL format. Below is an example of how to use it.
    <place your code here>\When your do that your code may look like this.select
         substr(sid || ',' || serial#,0,15) sid,
         USERNAME,
         PROGRAM,
         MACHINE,
         OSUSER,
         TERMINAL,
         sql_text Query
    from
         v$sqltext,
         v$session
    where
         address=sql_address
         and hash_value=sql_hash_value
         and status='ACTIVE'
    order by LOGON_TIME,sid,piece
    This one is more readable to everyone.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Where to see the SQL statement that CMP Entity bean excuted?

    hi, I'm wondering where I can find the SQL that a CMP entity bean executed in a transaction?
    thank you!

    You can do it in many ways. If you are using eclipse then using eclipse
    plugins for weblogic you van do it. I have heard that in weblogic workshop
    also you can do it. If the above do doesn;t solves your problem then check
    this out.
    http://www.p6spy.com/documentation/install.htm
    Hope that helps.
    <Xin Zhuang> wrote in message news:[email protected]..
    hi, I'm wondering where I can find the SQL that a CMP entity bean executed
    in a transaction?
    thank you!

  • See all SQL statements that have been executed in an active transaction?

    When I query v$transaction, v$session and v$sql, all I can see is the SQL statement that is currently running in an active transaction.
    How can I view all SQL statements that have been executed in a currently running transaction since that transaction began?

    Dana N wrote:
    When I query v$transaction, v$session and v$sql, all I can see is the SQL statement that is currently running in an active transaction.
    How can I view all SQL statements that have been executed in a currently running transaction since that transaction began?In the general case: impossible.
    In some special cases you can use v$sql, v$open_cursor, or "Availabilty>View and Manage Transactions" or something else.
    But be aware, transaction could be started long time ago, all cursor could be flushed from shared pool and closed, and redo (the page from Grid Control bring Log Miner) may not always be available.

  • How could I find the SQL statement who get this message ?

    ORA-01555 caused by SQL statement below (Query Duration=11191 sec, SCN: 0x0854.723b9c32)
    ... How could I find the SQL statement who got this message ?
    Thanks, Paul

    ORA-01555 means that the UNDO/ROLLBACK space is not large enough.
    This occurs because the SELECT statement is attempting to read the UNDO, but the UNDO has been released (transactions have committed or rolled back) and reused.
    The following are SOME of the reasons I have seen this to occur:
    1) Updates in a loop, with commits happening in the same loop
    - this will mark the UNDO available quickly and quickly reuse it. Then when the SELECT wants to rebuild a block, the UNDO used to rebuild the block has been reused (solution, make the UNDO bigger)
    2) A SELECT cursor used to control a loop in which updates are performed, and a 'done' flag is marked against the current cursor record, and commits are performed at the end of each loop, prior to fetching the next record
    - same problem as above, but it hits the current process. Same solution
    3) A 'month end' activity spike occurs, and all sorts of transactions create updates. There is a report that reports the activity - amusingly it needs to start at the beginning of all the work and updates periodically by doing a huge SELECT up front. This is then used to drive a loop which attempts to get information from the various transactions that have been updated and committed. After a while, the SELECT gets an ORA-01555
    - same problem as above and same solution. Get a bigger UNDO segment.
    You say this only happens once a month. That should give a hint.
    I wouldn't bother with which SELECT statement, as much as which APPLICATIONs are being run when it happens.
    One way around this - use 10g and set the guaranteed retention period. All sorts of other things will break, by no more 1555. <g>

  • How do I see the specific things that take up space on my mac?

    How do I see the specific things that take up space on my mac? Because I want more specific than what I get if I click on the apple and storage.

    There is also another way to do this using spotlight. Lets say you want to know what is in other. You go to spotlight and type in other,then click show all. It will open a window showing what is other and when clicked on it will ,down at the bottom show the file path for anything in other that you click on.

  • How do I erase the "other" files that are occupying my computer

    I already deleted pics, music, etc and I am ready to continue to delete unnecessary files. How should I erase the "other" files that are in my computer. Please, advice. Thanks

    For information about the Other category in the Storage display, see this support article. If the Storage display seems to be inaccurate, try rebuilding the Spotlight index.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
              iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then restart the computer. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation—not the mythical 10%, 15%, or any other percentage. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) or GrandPerspective (GP) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one. Note that ODS only works with OS X 10.8 or later. If you're running an older OS version, use GP.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS or GP can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install the app you downloaded in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the corresponding line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    sudo /Applications/GrandPerspective.app/Contents/MacOS/GrandPerspective
    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 by pressing command-V. You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Ignore any other messages that appear in the Terminal window.
    The application window will open, eventually showing all files in all folders, sorted by size. It may take a few minutes for the app to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with the app, quit it and also quit Terminal.

  • HT1222 How do I turn of my apps that are running in the background in the new 7ios

    How do I turn of my apps that are running in the background in the new IO7 operating system on my Iphone????

    Double tap on the home button, when the apps show up, swipe up on the thumbnail of the app just above the icon.

  • How to find if the SQL Reporting services are stand alone or clustered ?

    Hi All,
    Can any one tell me how do i find if the SQL Reporting services are stand alone or clustered ?
    As there are no other SQL features installed on the server except for reporting.
    Is there any GUI or CLI command to check this ?
    Gautam.75801

    Hello,
    Do not open cluster administrator since SSRS cannot take advantage of Windows Clustering Services.
    You need see if the Network Load Balancing manager (NLB) (windows feature) is installed on the SSRS computer and open
    it to see if a NLB cluster has been configured.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How do i do the SQL Statement tuning

    I had a basic question
    After writing a query that satisfies the functional requirements - how do I optimize it's performance so that it runs faster.
    I would be grateful if you describe the query optimization process in detail..
    especially what should be the query on the plan table that is used to see the execution plan in hierarchial structure
    Thanking you in advance
    regards,
    Manoj Gokhale

    Hi,
    how do I optimize it's performance so that it runs faster.http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/burleson_cbo_pt1.html
    Start by gathering an execution plan (explain plan), and check-out autotrace:
    http://asktom.oracle.com/tkyte/article1/autotrace.html
    - Look for possible unnecessary large-table full-table scans, caused by missing indexes
    - Look for sub-optimal table join orders (see the ORDERED hint)
    - Look for sub-optimal table join methods (nested loops vs. hash join)
    You can adjust the execution plan in many ways:
    - Adding misisng indexes or building materialized views (see the 10g SQLAccess advisor). Here are my notes:
    http://www.dba-oracle.com/art_dbazine_911_pt5.htm
    - Hints (especially table join hints, ordered hint and optimizer mode hints). Only use "good" hints:
    http://www.dba-oracle.com/oracle_news/oracle_faq/faq_tune_hints_list.htm
    - Enhancing optimizer stats (especially missing histograms)
    http://www.dba-oracle.com/art_otn_cbo_p4.htm

  • How can I see the past stat data?

    Hello,
    We're looking for a way to check the past stat data. We backed up the stat file, e.g. stat50, stat51,stat52... We tried to use the report RSSTAT26 and specified the backed up stat file, but it did not return any records.
    As stat/max_files is set to 48, we can see the stat data for 2 days via transaction STAD. But we'd like know how to see the stat older than 2 days.
    Does anyone have an idea?
    Regards,
    Masako

    Hi Sree,
    Thanks for your information. Unfortunately we cannot see any stat data which is older than 2 days by transaction STAD. 
    I checked help.sap.com.
    http://help.sap.com/saphelp_nw70/helpdata/en/27/930e422dfcdc2ce10000000a1550b0/frameset.htm
    And found the following statement.
    This means that after two days, you can no longer perform an analysis below transaction level.
    We're looking for a way to analyze the stat files which are backed up before it is overwritten.
    Our environment is as follows.
    -NW7.0
    -ERP 6.0
    -AIX/DB2
    Best regards,
    Masako Konno

  • How to always hide the SQL statements for users when they run User Queries?

    Hi,
    from the IT dept. position, I don't want users to see and be so curious about the SQL commands.
    How can I always hide the textbox of  Display Query Structure?
    thanks.

    Hi,
    Unfortunately system design has short of this function. If users are allowed to run those queries, you can not hide the query structure.
    You may post a DRQ here: /community [original link is broken]
    Thanks,
    Gordon

  • How do I see the available gb that I have on the bottom of each open folder?

    I recently upgraded to Mountain Lion from Snow Leapard. Before I could see my avaiable memory and used memory at the bottom of each open folder. However, since the upgrade it does not show anymore. How do I change it back do that it will show?

    memory or hard drive space?
    you can check through activity monitor on how much memory have you got left and you can also click on your apple logo - about this mac - more info - and click on the storage tab to see how much hard drive space you've used up and how much have you got left.
    see images below - first image is for memory - second image  is for hard drive.

  • How can I see the actual FORM that was submitted?

    I need to see ALL data on the form after it's submitted to me.  NOT just the data filled out in the form.  I applied logic rules to certain JPEGs that should pop up upon correct anwser!  Can you please tell me how see ALL data?????
    Thanks!

    I may be mis-understanding what you are doing, but skip logic doesn't work differently for text/jpeg... 
    In your form, I was assuming the JPEG images were images that you added, and that they are only shown based on certain answers to other questions, is that correct?  If this is correct then it does not matter whether it is text or images, all questions and responses are shown in the PDF, the images would be shown, also any answers that exposed images to the user in the web form would show as answered and you would know what they had entered even though you'd see all of the images.
    Or, are you having users upload JPEG images using an "Attachment" field? 
    If the latter was the case, these are user supplied images, then the PDF Response would only show the file name, and not contain the image.  Is that what you are describing/seeing?
    Thanks,
    Josh

  • How can I see the phone number that a contact used to call me?

    I have several contacts in the addressbook of my iPhone 4 (iOS 5.0.1) for which I have entered multiple phone numbers. In the call history the names of my contacts are shown, which is fine. To call someone back based on the history  I would like to know which number was used to call me. Is there a way to get to this information?

    It will say "mobile" Home", etc under the name.
    You can also tap the blue arrow and see the highlighted number.
    iPhone User Guide (For iOS 5.0 Software)

Maybe you are looking for

  • MacBook Pro suddenly started freezing up. Help :)

    Problem description: Two days ago, out of nowhere my MacBook Pro started running super slow and lagging after about every other mouse click, or after typing and hitting backspace. I haven’t installed anything recently. I noticed it seemed to be runni

  • ABAP Dictionary type FLTP is not allowed for screen element

    Hi Experts I tried to open VBFA in se16 and i got the message in the status bar like this , what does it mean. please explain. "ABAP Dictionary type FLTP is not allowed for screen element"

  • Security deposit Clearing Problem

    Dear Team, I am encountering a proglem while clearing the security deposit amount.Though i have made payment and as well transfer the reconcilliation key and done the clearing too.But the system is still showing as a un Cleared item ,am I missing som

  • Suse11.2 SAP ERP6 INSTALL  ./sapinst do not start

    hi guys i have done jdk install and /etc/profile work. and ip and hostname in /etc/hosts, export DISPLAY=IP:0.0,xhost. all are done ! but still  ./sapinst do not start!!! Starting GUIServer using:   SAPinst port         : pipe:5:8   GUIServer port   

  • What do I do if Iphoto is not working?

    When I click on the iphoto icon it opens but the window is completely blank and after a few seconds the loading icon appears and when I right click on the iphoto icon it says not responding. It has been doing this for a few months now and I can not a