history of SQLs executed by a user?

env: 11.2.0.1 linux

I am responsible to me to retain all of the SQL executed by a particular db user last week.
Do you know guys if it would be possible to trace the activity of the user so far back (no additional active audit). ?

Thank you.

Hi AJ,.

Check dba_hist_active_sess_history. You will find that the top-n queries, but I think it's a good starting point. You need Diag/Tuning pack activated for this.

Lukasz

Tags: Database

Similar Questions

  • A query to return all the SQL executed for a particular user instructions.

    Hello

    Is it possible to find all the instructions SQL for a particular user using the views v$? I can do it 10g but I am currently using 9i, the query below does not work.
    select a.username,a.logon_time,b.sql_fulltext 
    from v$session a,v$sqlarea b 
    where a.sql_id=b.sql_id
    and a.username='USER'
    order by a.logon_time desc
    I guess that some columns in these views do not exist in 9i. The output of 9 that I use is 9.2.0.1.0.

    Your help is very appreciated.

    Thank you
    Select this option.

    Dear mark!

    I suggest you use the audit instead of v$ sqlarea. Onlinedocumentation said the next thing Oracle v$ sqlarea:

    >
    V$ SQLAREA lists statistics on the shared SQL area and contains a line by the SQL string. It provides statistics on SQL statements that are stored, analyzed and ready for execution.
    >
    This means that you will only get the SQL statements that are currently in memory. Older statements which are already deleted from memory are not visible for your query.

    Incidentally, if you simply want to know what's wrong with your query then please post your errormessage.

    Yours sincerely

    Florian W.

    Published by: Florian W. the 29.07.2009 12:03

  • History of SQL do not sort by date; new format of TS v4?

    I was afraid that my history of SQL was not accumulating after upgrade, as it seemed not as I expected.


    I generally sort descending timestamp, but I find that hold since the installation of the version 4.0 production this different format of timestamp on the history of SQL took, ignoring the NLS settings that I put in my preferences (which were not those default to my territory and language, incidentally).

    I migrated all my settings from the previous installation, I had... .sqldev4 ea3.  previous migrations from v3 to v4 ea1 to v4 ai2 to v4 ea3 ever disturbed my history of SQL.

    Now my recent entries are buried in the history of SQL and show no longer on top, and sorting by date seems erratic, it is impossible to see a chronological order of the executed SQLs before and after migration.

    Y at - it shaped a command to put the SQL history timestamps or I have to go spelunking in the xml files to change a setting?

    Curiously,.

    Steve

    Toolmakers were the question ID and he set our next update.

  • Ai2/EA1 2.1: a few bugs on the history of SQL

    Hello

    Against Oracle 10 g 2 databases.
    History of SQL is buggy on some statements.
    It is saved two times and the number of execution has increased by 2 each time executed following instructions:
    1. DML (INSERT, UPDATE, DELETE) statement
    2. the DDL statement (i.e. CREATE, ALTER, TRUNCATE TABLE)
    3 DCL (commit and rollback)

    It works very well only for SELECT statements.

    Kind regards

    Buntoro

    Connected
    Bug 9009500 - 2.1: EA1: RUNNER STATEMENT CONNECTING the STORY TWICE

    -Rambeau

  • How do I get all the SQL executed by my session?

    How do I get all the SQL executed by my session?

    Published by: user11300376 on 01/28/2013 11:27

    user11300376 wrote:
    I had tried, brings itself however only select table v $ session.

    Executed orders:

    SELECT * FROM MBS_ITEM;

    SELECT b.sql_id, b.sql_text
    SESSION $ v a, v$ sql b
    WHERE a.sql_id = b.sql_id;

    The output result:

    SQL_ID SQL_TEXT
    1 4qg3bft0w37rt SELECT b.sql_id, b.sql_text FROM session $ v a, v$ sql b WHERE a.sql_id = b.sql_

    The listed application is good, but does not limit the output of your session - it should return data from all sessions.

    You must add an AND condition in the WHERE clause to limit your session. You can try this (untested)

     where audsid=(select userenv('sessionid') from dual);
    

    You can also perform a SQL trace and tkprof to obtain data to SQL executed the trace start and end of the trace.

  • recently sql executed by applications

    Dear all,

    I would like to build a module for my application debugging and modules can display later or recent sql (eg 10) performed by the application.

    I found a similar sql but this single list last sql, sql

    Select a.username, a.terminal, a.program, b.sql_text
    session $ v a, v$ sqlarea b
    where a.audsid = (select userenv ('sessionid') of double)
    and a.sql_address = b.address
    ;

    Is there a way to list 20 recently sql executed by the application?

    THX!

    Reference documents;
    1 watch the last sql of the current session: oracle, session, last
    http://www.experts-exchange.com/database/Oracle/Q_20973836.html

    2 AskTom discussion
    http://asktom.Oracle.com/pls/ask/f?p=4950:8:519498075307800596:no:F4950_P8_DISPLAYID, F4950_P8_CRITERIA:497421739750,

    Try to gather a lot of data when an application has encountered an error seems to be a rather poor idea. To the point where you met a connection error, you're probably not in a good position to run a bunch of queries. After all, the error may be your connection to the database has been lost, your session has been killed, etc..

    Generally, it would be more logical to keep a log of what the app does at each stage and then to a clerical error in the newspaper when there is a mistake, point from which a person can spend by the newspaper to try to find the source of the problem. It is quite common to just reel the paper constantly in a file and do rotate programmatically newspapers to prevent them from using too much disk space, but you could also allocate a few MB of memory and to keep a living newspaper that gets only written to disk when an error is generated.

    Justin

  • ADO error: SQL execute.vi is not executable.

    Thanks for all those who are willing to help me out of this problem which intrigued me several days, I can't find a similar one of Google or another forum...

    Problem:

    When I was with LabSQL, he came a mistake:

    Sub - VI "execute SQL": Subvi is not executable. and then I looked for the source of the error, it finally turned the

    "ADO Recordset GetString.vi":

    ' invoke the method node: invalid '.

    ' invoke the node: invalid refnum class.

    What I have used is Windows 7 and LabVIEW7.1.

    The details of this problem, which includes the vi and a few photos of the error and ADO functions, I used is attached.

    Ute.VI' is

    Hi FedorLeon,

    I opened the LabSQL library, and no VI is broken in it. Which brings me to think about 2 possibilities:

    -Your TEEN of ActiveX on your computer is not installed properly or not using is not the same version, as expected by the library.

    -Your LV 7.1 on Win7 fails. That wouldn't be surprising, because the first version of LabVIEW to support Win7 is LV 2009SP1 ;-) Make a test on a machine XP LV or a LV 2012 on your Win7 machine!

    Kind regards

  • See history of SQL text

    Dear all,

    I have a sql id and I want to know when this query ran the last time.

    BR.

    Mustafa

    Unless you have the appropriate level of active audit, there is no guaranteed way to know.

    ASH data are a sample of current session - V$ ACTIVE_SESSION_HISTORY is once per second, DBA_HIST_ACTIVE_SESS_HISTORY every 10 seconds.

    There is also a limit retention, V$ being a buffer in memory, the table DBA_ being in the AWR repository for a default of 8 days.

    So, if the statement is long, you

    If the last SQL execution is always in memory - V$ SQL - and then you get lucky.

    Similarly, if it's heavy hitting then AWR via DBA_HIST_SQLSTAT can tell you in what AWR Snapper window he was executed.

  • Purge the history of Sql for sql workshop

    in decelopment APEX-> SQL workshops-> commands sql

    You can run sql commands.

    is it possible to purge the history?

    Hello

    The forum admin can do that

    http://docs.Oracle.com/CD/E37097_01/doc/doc.42/e35129/adm_mg_service_set.htm#sthref329

    Kind regards
    Jari

  • SQL for extracting industries, users and their reports?

    Hello

    I could get in sql, users and their reports or business sectors and their users, but I can't recover the business sectors, users and reports in the same sql.

    I searched in the tables of eul without success. I guess someone has already done?

    Thank you

    Hello

    The problem you have is that you try to mix items that don't go together.

    As you have already determined, you can have a script for users to query with access to business areas, and you can also have a script for queries users who access or own reports. However there is no link between the districts and business reports.

    Discoverer reports are validated against the records, not business districts. If a report uses 2 files and there are 10 industries that contain these files what industry do you that the report has been written against? The answer is none of them. You just happened to have a business district that is open at the time the drafting of the report, but frankly you might have used an any of them. Therefore, if a user opens a workbook that uses the files found in several business sectors, discoverer by default to the first business district name that contains all the files used and the user has access to.

    Hope this helps

    Best wishes

    Michael

  • How to set multiple parameters in a sql EXECUTE IMMEDIATE

    I want to set nls_language and nls_date_language and set them as different languages. fnd_global.set_nls_context () does not work. So I think I can use the EXECUTE IMMEDIATE and add them together into a single statement. But I don't know how to make that happen. Can someone help me? Thank you very much.

    PS: It must be done in a single call.

    928091 wrote:
    Hey, thanks for your reply, I forgot to mention that it should be in the begin-end block, do you know how?

    EXEC is a more SQL API which can be used to execute the PL/SQL code. What it does is put the PL/SQL code in a BEGIN block... END of block and run.

    So, you can also manually put code in a BEGIN block... END of block and run like that.

    SQL> begin
      2     execute immediate q'[begin execute immediate 'alter session set nls_date_language = ''AMERICAN'''; execute immediate 'alter session set nls_language = ''AMERICAN'''; end;]';
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    And I don't understand what possible benefit he made a single run in a BEGIN block... Terminate during execution of multiples.

    Why this code is not in your interest, something like this

    begin
         execute immediate 'alter session set nls_date_language = ''AMERICAN''';
         execute immediate 'alter session set nls_language = ''AMERICAN''';
    end;
    /
    
  • SQL Developer privileges and user...

    Hi all! I created the user in DB. When I connect to that user through SQLDeveloper I can see other users tables. How can I disable this? While I don't see any other tables of users? And how do I see all my user roles and privileges?

    Best regards, Debuger!

    This is determined by their privileges with all your username in the database. What roles/privileges give you him?

    In SQL Developer, you can use the DBA module to display the privileges (select view |) S/N).

    You can also do

    select * from session_privs;
    

    which gives you a view flattened what you have.

  • How can I find an SQL executed and completed on time?

    Hello

    Could you please help me I want to learn started and finish time for SQLs?
    If it is possible?

    DB version: 9.2.0.8

    Thanks and greetings

    Published by: OracleADay on May 12, 2011 16:23

    What term you ask little more describe

    If in terms of query executed last time, this link will be helpful

    http://forums.Oracle.com/forums/thread.jspa?threadID=927452

  • How can I get information about the history of corporate 6.3.1 users

    Need help on the following points. Since I'm a guy HFM and don't have no business touching for awhile, I need help on the following points:


    We want to have a report that shows the history of users re: date and time users log in and out of each application Hyperion 6.3.1.

    Where can I get this information? Thought to look in the file < application > .use but not able to see it properly using a text editor.

    Company has not all newspapers following connection/disconnection information. Optionally, check the error log for the first activity that a user performs for example:
    data refresh or the loading of data, that contains the date and time of execution, but it will require filtering of data.

  • queries executed by the user

    Hello
    RDBMS: 10.2 standard edition

    I have a thbaig of the user. I want to display the queries run by thbaig. I tried v$ sql, V$ sqlarea and v$ session, but not found results.

    is someone can you please tell me how I can accomplish this task?

    Try v$ sqlarea also.

    If you don't find anything, then, I guess the SQL user analyzed either got pushed off shared pool OR the user has not run any sql in the database?

    Experts here would be better able to respond here.

Maybe you are looking for

  • Satellite C660D-1EP - network controller has disappeared

    Please, I beg you! For some reason my network controller went bad and now appears on device like an exclamation point Manager, so I can't access the internet... (Not happy children) I have a Toshiba Satellite C660D-1EP model. I searched Toshiba downl

  • How do install from unknown sources?

    My 18382 GM Tablet could not start recently and was sent back to Lenovo for repair. They reimagee it and now I am trying to install the apps I had on this subject before. An application is not on the Play store or App store. I don't see an 'unknown s

  • Has anyone been scammed by a company that identified themselves as microsoft and use teamviewer to take control of your pc

    I received a call from this company who identified themselves as microsoft technical support. They say that my computer was sending a generated message that my system is infected with a virus and all my personal and financial information might be sto

  • I can't send messages via Live Mail.

    OT: Live Mail This morning, I have developed a problem.  I can't send messages via Live Mail.  I can receive but can't send. I get the error message "a problem has occurred while trying to open this message A problem has occurred please try again." 

  • Cannot connect using any user

    Original title: want to connect again? NO! Hello world I have a problem on my computer and I wanted to share it with you all, because Microsoft in my country could not help so maybe one of you has the solution.A few days ago, when I turned on my comp