SQL queries

Dear all,

We hope that all are doing well. I need your help, I want to find all sql queries executed in the month 1 in my oracle, verification of the database database is disabled.

I tried v$ sql, but it gives only spent 15 days sql queries executed.

I'm looking for 1 month? your help will be appreciated, thanks in advance.

OS: RHEL 6.1

DB: 11.2.0.3

Kind regards.

If you use more than one log archiving then use following code for example:

Start

sys.dbms_logmnr.add_logfile (nom_fichier_journal => ' /Archivelog/1_9745_771967668.dbf',options-online sys.dbms_logmnr.new).

sys.dbms_logmnr.add_logfile (nom_fichier_journal => ' /Archivelog/1_9746_771967668.dbf',options-online sys.dbms_logmnr.addfile).

sys. DBMS_LOGMNR. Start_logmnr (options-online sys.dbms_logmnr. DICT_FROM_ONLINE_CATALOG);

end;

/

Tags: Database

Similar Questions

  • How to find the primary key columns in the tables in MS Access using SQL queries

    How to find the primary key columns in the tables in MS Access using SQL queries

    Hello

    This is the forum for Windows Vista programs related issues.

    For better assistance, please try instead the Forums in SQL Server .

    Thank you! Vincenzo Di Russo - Microsoft MVP Windows Internet Explorer, Windows Desktop Experience & security - since 2003. ~ ~ ~ My MVP profile: https://mvp.support.microsoft.com/profile/Vincenzo

  • to solve the problems of performance (running slow SQL queries), which should be the systematic approach

    Hello

    I am new to oracle.  Need some advice on how we should approach to problems of performance especially for SQL queries running slow on the database.

    Thanks in advance.

    6e85b3c2-5f02-40CB-A8AD-d2279f63b4be wrote:

    Hello

    I am new to oracle.  Need some advice on how we should approach to problems of performance especially for SQL queries running slow on the database.

    Thanks in advance.

    Start here;  http://docs.Oracle.com/CD/E11882_01/server.112/e10822/TOC.htm

    Continue here: http://docs.oracle.com/cd/E11882_01/server.112/e41573/toc.htm

  • How to find the sql queries executed in one day with the sql and runtime text

    Hi Experts,

    Please tell me the sql query to find out the queries executed on a particular day and the runtime and the sql text of the query.

    Please reply urgent.

    Thanks in advance

    Database instance 'A' may have run 100 SQL queries today.  As for the instance of database 'B' could have exploited queries SQL 1 million today.  Instance of database 'B' to 'keep' the 1 million SQL statements - in memory or on disk do you expect?  Of course not.  There the age or flush or invalidate memory SQL statements.  He can't keep them on the disk (imagine running a completely different set of 1.2million SQL statements tomorrow and 1.3 the next day).

    AWR and StatsPack can make counts the number of "n" top of the page ("n" default to 30) SQL statements which are still present in the cache of the library (not years, rinsed, invalidated) when a snapshot was taken.  They can't declare "all" SQL statements.

    To return to your needs.  WHY do you need all the SQL statements?  Or are there only certain operations specific SQL would you be interested?  Could they have been treated by allowing audit (for example, UPDATE and DELETE with EXTENDED verification instructions)?

    Hemant K Collette

  • How to tell the difference between access through JDBC and direct sql queries through server dimensions

    Hi all

    We use an Oracle 11 g server, the request is sent to the oracle database through different ways, one directly from the server of dimensions and is another method below

    • TDC customer creates a session in the api
    • session of the API sends a request to the application server
    • application server queries the database

    Of course, I see all the sql queries in the oracle database, but what I am interested in is now what queries go directly through the server dimensions and through the API. Please tell me how I can find this information.

    MACHINE, TERMINAL, PROGRAM, MODULE and CLIENT_INFO column in V$ SESSION could give you a clue.

    HTH,

    Lordane Iotzov

  • unnecessary SQL queries for ViewObject used in different tab

    In my application, I have a table A in the first tab and table B in the second tab.

    Sometimes when I work as a user with table B in the second tab, the ViewObjectA for table A is executed.

    Of course this ViewObjectA execution is absolutely useless, because I work in another tab and I don't don't even see table A.

    Unfortunately, the query takes a long time and it makes the application slower.

    Question: why the ADF runs the query for a table that is not visible and the user accesses not?

    Is it possible to prevent it?

    A note on the configuration that may be linked to the problem:

    The ViewObjectA has an implementation customized with debug messages (that's how I discovered the ViewObject is exectuted).

    Due to the limitation of the DB, I have configured my pool ApplicationModule instances of timeout after 120 idle seconds (because the DB does not like the many connections and long-term).

    I also found that after the expiry of the ApplicationModule, a new instance of ViewObjectA is created (Yes, it should according to the ViewObjectImpl API).

    It seems to me that the unnecessary ViewObjectA execution happens after this new creation of instance of ViewObjectA.

    Well, the execution of the query of a VO is part of the creation of a VO.

    You can try to adjust it for example, you add a where clause such as 1 = clause: bindVar' and init the bindVar to 0 so that the query is performed from the user interface (see JDeveloper: obstacle to the return of the games to outline on the loading of the page of VO using the binding variable |) JDev & amp; ADF Goodies).

    Or follow Andrejus Baranovskis Blog: Oracle ADF Tuning: prevent execution of SQL queries during the loading of the Page

    Timo

  • SQL queries that are stored in an array of sql pl

    I wonder if it is possible to have the SQL queries stored in a table in Oracle DB? I searched in google, but it seems that I'm bad key words to find the answer.

    I am trying to build sql queries in a certain place as a package or a procedure, and the logic would be completely out of the object sql queries in a table and the table to run each sql query in a loop.

    The version of oracle database is 11g.

    Thank you
    Martine

    Martine wrote:
    I see. I thought this would be a common practice. Thanks for your comments.

    Oh don't get me wrong... This is quite common.

    Makes him no better good :) It is not yet the "right" way to do things in 95% of the places that he did.

  • Join the two sql queries

    Hi all

    Thank you very much for all the kind support so far.

    I have two report (sql query)

    I want to add both the sql query

    1st sql query

    select distinct(a.item_number)
          ,a.quantity - b.quantity
    from QUANTITY_ONHAND_ATP a,BACKLOG_ATP_LT_CW b
    where a.item_number = b.item_number
    order by item_number
    2nd sql query

    select distinct(wb.item_number)
           ,wb.quantity - be.quantity
           ,c.quantity - d.quantity
    from BACKLOG_WEEK_BEFORE_ATP wb
        ,BACKLOG_ATP_ET_CW be
        ,BACKLOG_WEEK_AFTER_ATP c
        ,BACKLOG_ATP_GT_CW d
    where wb.item_number = be.item_number
       and c.item_number = d.item_number
       and wb.item_number = c.item_number
       and be.item_number = c.item_number
       and wb.item_number = d.item_number
       and be.item_number = d.item_number
    order by wb.ITEM_NUMBER
    In the 1st sql query I have 129 records and in the 2nd query sql, I have 14 records. I want to combine these two sql queries. If the item_number 1st sql query is not there in 2nd and then view it as to 1 sql only.

    Any help how to do that.

    Concerning

    Published by: User_Apex on July 15, 2011 01:21

    Use the NVL function:

    select q1.item_number, WEEK_BEFORE, nvl(CURRENT_WEEK,0) CURRENT_WEEK, nvl(WEEK_AFTER,0) WEEK_AFTER
    (...)
    
  • See the SQL queries used

    Hello.

    I use gR 10, 3 of the UMC.

    Is it possible to see all the sql queries that are used by the Complutense University of Madrid.

    In my case, I've defined a query in Sitestudio, which looks like this
    dDocType <matches> 'someType'
    I want to know the SQL of the query.

    Thanks for all the answers
    Brahim

    Hello

    Navigate to Administration - System Information Audit - tracing of the Sections - active Sections.

    Put systemdatabase, searchquery and enable detailed full tracing.

    This will give you the sql queries running for all actions on the Complutense University of MADRID.

    Systemdatabase gives all of the query sent to DB by UCM.

    SearchQuery gives the query when the clause are formed during a search.

    Thank you
    Srinath

  • Recursive SQL queries

    Hello

    Is this possible in ODI to implement recursive SQL queries in ODI interfaces?
    If so - what version of ODI is necessary to have?

    Thanks in advance,
    H.

    Edited by: h_elmu_t the 10.08.2010 18:02

    Hey H.

    no alternative in this case. As far as I know, it will be necessary KM customization for this and it's complex...

    Cezar Santos
    http://odiexperts.com

  • How to use the value of the select in SQL queries list

    I have a list with the list of states (P1_STATE) in Page 1. When I send the page, I get the VALUE of P1_STATE in Page 2 to the format: DC:AS:AK. I use the application to display the form in the Page 2 below.

    Select *.
    of STATE_REF
    where IN location_id (: P1_STATE)

    Now the format of P1_STATE will not work in the query. So it's not fetch all results. Is there a way in which the values of the selection list can be used in SQL queries. Thanks for the help.

    Hello

    Try something like:

    select *
    from STATE_REF
    where ':' || :P1_STATE || ':' LIKE '%:' || LOCATION_ID || ':%'
    

    Andy

  • Writing SQL queries in BAM reports

    Hello
    Is it possible to write SQL queries in BAM reports.

    Thank you

    If you're looking to display the data in the BAM report by writing your own query SQL, which is not possible at the moment.

  • Test SQL queries (QA Tool)

    Hi all

    Today, I heard a project on the test of SQL queries.

    I always test the queries manually. Through the tables, where clause etc.

    I there any QA tool to test SQL queries.

    If queries are application based, then how may test us?

    Good answer if it exists, so that I could participate in the project.

    Thank you and best regards,
    Kannan Baker

    The demos that I use at the University of Washington are here:
    http://www.morganslibrary.org/library.html
    under TKPROF

  • TOP 10 SQL QUERIES

    Hello

    How can I find the 10 top sql queries which many high IO, CPU. in oracle db.
    I do it in a way that using the command TOP trying to get the PID then I get the sql query by applying the hash value in v$ sqlarea.

    Y there is it possible to get directly high consumed IO and CPU with see PID in TOP command.

    Thanks

    Hello

    try something along the lines of

    select c.* from
        (select disk_reads,
                buffer_gets,
                rows_processed,
                executions,
                first_load_time,
                sql_text
           from v$sqlarea
           where parsing_user_id !=0
           order by
              buffer_gets/decode(executions,null,1,0,1,executions) desc ) c
    where rownum < 11;
    
    select c.* from
        (select disk_reads,
                buffer_gets,
                rows_processed,
                executions,
                first_load_time,
                sql_text
           from v$sqlarea
           order by
              disk_reads/decode(rows_processed,null,1,0,1,rows_processed) desc ) c
    where rownum <11;
    

    or even

    --Top 10 by Buffer Gets:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            buffer_gets, executions, buffer_gets/executions "Gets/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE buffer_gets > 10000
     ORDER BY buffer_gets DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Physical Reads:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            disk_reads, executions, disk_reads/executions "Reads/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE disk_reads > 1000
     ORDER BY disk_reads DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Executions:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            executions, rows_processed, rows_processed/executions "Rows/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE executions > 100
     ORDER BY executions DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Parse Calls:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            parse_calls, executions, hash_value,address
       FROM V$SQLAREA
      WHERE parse_calls > 1000
     ORDER BY parse_calls DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Sharable Memory:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            sharable_mem, executions, hash_value,address
       FROM V$SQLAREA
      WHERE sharable_mem > 1048576
     ORDER BY sharable_mem DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Version Count:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            version_count, executions, hash_value,address
       FROM V$SQLAREA
      WHERE version_count > 20
     ORDER BY version_count DESC)
    WHERE rownum <= 10
    ;
    

    You may need to play with the column formatting a bit to show the best results

    concerning

    Alan

    Published by: alanm on December 22, 2008 16:01

  • TopLink grid 11g: conversion of SQL queries to the filters of consistency

    I would like to know how efficient the conversion of SQL queries for filters of coherence is wen search an object in the cache coherence. TopLink does something as instruction cache cache filters consistency as well? In this regard, you have number of performance?

    Thank you very much!

    Ming-Wen

    TopLink grid currently has a rudimentary filter cache that allows TopLink to only translate NamedQuery once. This allows TopLink grid to reuse the same filter on subsequent runs of this NamedQuery.
    -Gordon

Maybe you are looking for