I want the list sql queries performed someone in one session based

V$SESSION V$SQLTEXT and audsid (taken from sys_context('USERENV','SESSIONID') ) are great .. session_id be generated by a trigger when the application logs on) but then uploading the list of sql queries made by that user (application) until they log off seems impossible.
I've tried creating triggers that check if V$SESSION changes with respect to an audsid number and sql_hash_value but it didn't work. I'm trying to work out why.
In the meantime I thought I'd post this to see if anyone else foudn another way.
I don't want to use sql trace that just gives load of info, I just want simple sql queries.
Auditting seemed a bit complicated, can that list ALL DML and DDL commands made by a user? if so how?
thanks
Bobby

quite right.
Oracle enterprise dedicated server 9.2.0.8 on solaris 10.
I just want to log all command DML and DDL, without stats or anything like that, simply a list, in a chronological order would be nice.
I found something called dbms_fga package but not sure if thats what I want. Seems I have to implement it on specific tables. which is not good if the application hasn't created the tables yet.
Thanks in advance.

Similar Messages

  • How to find the list of Queries/Reports which are using Exceptional Aggregation in SAP BI?

    Hi All,
    We are interested to know how to find the list of Queries/ Reports which are using Exceptional aggregation in SAP BI.
    Please let us know is there any table's to check the list of reports using Exceptional Aggregation in SAP BI.

    Hi,
    Here you go..
    1) Go to table RSZCALC and get list of ELTUID where AGGREXC is not INITIAL and AGGRCHA is not initial; now you get only exception aggregation set based on some chars. Also you can further add STEPNR = 1 since your intention is just to get query name , not the calculation details; this will reduce number of entries to lookup and save DB time for next steps.
    Here you will get list of exception aggregation UUID numbers from which you can get properties from RSZELTDIR.
    2) Pass list of RSZCALC-ELTUID to table RSZELTXREF - TELTUID and get list of RSZELTXREF -SELTUID - this table stores query to it's elements maping kind.
    3) Now again pass RSZELTXREF - SELTUID into same table but into different field RSZELTZREF - TELTUID and get RSZELTXREF - SELTUID
    This step you get query reference sheet or column or query general UUID for next step.
    4) Pass list of RSZELTXREF - SELTUID into RSZELTDIR - ELTUID with DEFTP as 'REP'. Now you get list of query names in RSZELTDIR - MAPNAME and description in TXTLG.
    Note: you can also get the reference chars used for exception aggregation from RSZCALC - AGGRCHA field.
    Hope this helps.
    Please keep in mind, it might take more time depends on how many query elements you have in the system...
    Comments added for better DB performance by: Arun Thangaraj

  • Script to find the list of Queries currently running in database with User Login Name and Host Name.

    Hai,
    How to find the list of queries currently running in the Database with User Login Information.
    Since my database application is running slow, to find the slow queries.

    Try the below query
    SELECT r.start_time [Start Time],r.session_id [SPID],
    DB_NAME(database_id) [Database],
    s.host_name,
    s.program_name,
    s.login_name,
    SUBSTRING(t.text,(r.statement_start_offset/2)+1,
    CASE WHEN statement_end_offset=-1 OR statement_end_offset=0
    THEN (DATALENGTH(t.Text)-r.statement_start_offset/2)+1
    ELSE (r.statement_end_offset-r.statement_start_offset)/2+1
    END) [Executing SQL],
    r.status,command,wait_type,wait_time,wait_resource,
    last_wait_type
    FROM sys.dm_exec_requests r
    OUTER APPLY sys.dm_exec_sql_text(sql_handle) t
    inner join sys.dm_exec_sessions s
    on s.session_id = r.session_id
    WHERE r.session_id !=@@SPID -- don't show this query
    AND r.session_id > 50 -- don't show system queries
    ORDER BY r.start_time
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • How to find the list of Queries for that have statistics enabled in the sys

    Hi ,
    How to find the list of Queries  that have statistics enabled on them in the system.
    Please help me in this regard
    Thanks
    Maruthi

    hi ,
    I found three options there like
    X - on
    D - Default
    off
    can you please expalin the difference between on and Default
    Thanks in Advance
    Maruthi

  • How to find the list of queries containing a Particular Infoobject

    Hi all,
    I have requirement to find the list of queries and workbooks which contains a Particular Infoobject. Please advice is there any Database table or Programs exists to find..
    Thanks in advance
    GAMY..

    Hi,
    Thanks for your replies.
    I have tried the oprion already..(RSD1 > Type in the name of the InfoObject and from the menu Edit > choose Where Used list.) but no use. It doesn't show the list of queires..It shows only the data targets.
    I would like to know is there any table to achieve the requirement.
    Thanks in advance
    Ganesh(GAMY)

  • Want to practice SQL queries, do I need to download SQL editor

    Hi All,
    I have a doubt..
    I want to practice SQL queries. for this, do I need to download SQL editor and Intall or If I download any Oracle version, does it will have SQL editor? please anyone answer my question.

    I'm not sure how is it related to Peoplesoft, but if you installed an Oracle client on your client machine, then you have SQL*Plus or SQL Developer.
    Nicolas.

  • Detemine ALL sql queries being executed by a session

    Hi All,
    I want to find out ALL SQL queries being executed by a session on the DB. I have thought of enabling the SQL Trace for that session, then create my trace file for the session in the udump area and then check that trace file to view all the SQL's being executed in that session till the time i set my trace to FALSE.
    Would enabling the trace for that session suffice for capturing each and every SQL fired in that session? Or do i need to check anything else?
    Thanks in advance.

    hi,
    select sql_text
      from   v$session, v$sqltext
      where v$session.sql_address = v$sqltext.address
      and   V$session.sql_hash_value = v$sqltext.hash_value
      and  sid = &sid
    order by piece
    /thanks,
    baskar.l

  • Just got a new iPad, but I don't want the info from my old on this one. How to I set it up again?

    Just got a new iPad, but I don't want the info from my old on this one. How to I set it up again?

    Here's an article on how to setup your new iPad.
    http://ipad.about.com/od/iPad-Tutorials/ss/How-To-Set-Up-An-iPad-For-First-Time- Use.htm

  • If I want the month-to-month licence only for one month do I have to cancel and how?

    if I want the month-to-month licence only for one month do I have to cancel and how?

    I have never tried to use a program for only one month, but here is how you cancel
    -cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or http://helpx.adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • Want to write sql queries online

    Hi,
    I want to write and test sql queries online. Because oracle database is too large I do not want to install it on my system. Is there any virtual environment where I can learn sql queries and test without installing it on my local machine?

    SQL Fiddle apparently offers a test bed for various databases including Oracle 11gR2.
    I haven't used it myself but it was highly recommended by SQL Indexing Tutorial | Use The Index, Luke! which is a good SQL performance tutorial.

  • To get the list of queries in which a particular variable is used - urgent

    Hi Friends,
    I have a list of variables which were used in some queries, now I need to know list of queries in which the given variable is used.
    for example: There is a variable called ZVBASMNT and used in some queries, I want to get the names of the queries in which it was used.
    please give some short method for this, if there is any table or Tcode for this please provide, its bit urgent.
    Thanks & points will be given for the helpful answer
    Regards...
    Ganesh

    Dear Ganesh,
    Yes, You can find.
    Goto Metadata Repository in RSA1.
    Click on Query
    Selct / Click on a Query which uses your variable ZVACITY
    Click on your variable
    Just observe the USED BY list.
    Regards,
    Ram.

  • Table name to know the list of queries

    I want to get the list of reports in which given info object has been used.
    Could you help  me in indentifying the table name which will provide the  this info.

    Dear R S
    I do not know such a table, but maybe there is another solution. If you start the "Transport Connection" and select your InfoObject with grouping option "In Data Flow Afterwards" you should see all queries under node "Query Element".
    Greetings,
    Stefan

  • Want to execute SQL Queries from Textfile

    I have a text file full of a bunch of sql queries, of the format:
    select something1, something2
    from someplace
    select something3, something4
    from someplace2
    select something5, something6
    from someplace3
    I want to execute these queries one at a time and then after each one executes, I will do something with the resultset. Question is, how do I pull each query from the text file one at a time and execute? I was doing this by using java.util.Scanner and java.lang.StringBuilder where I would scan one line at a time and then check to see if the line is empty, otherwise I append the line to the StringBuilder. If the line is empty, I process whatever is stored in the StringBuilder. The problem with doing this is that it does not preserve the newline from the text file, so I get queries that look like:
    "select something5, something6from someplace3"
    which of course are invalid. Does anyone know a better way to build SQL queries / statements from a text file? How do I get the newline or carriage return character?

    Just replace newline by space?

  • I want the PL/SQL tuning material

    Hi,
    I need to learn to pl/sql tuning.can anyone provide me the PL/SQL TUNING material ASAP.
    Plz mail to the following id : [email protected]
    Thanks
    Ravindra

    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96533/sqltrace.htm#1018

  • How to get the list of Infocube/DSO in which one nav-attr is used

    Hi all,
    i have a requirement to find the list of all infocubes and DSO in which a particular navigational attribute  say:xxx_yyy   [i have list of 50 nav attr for which i have to do this] is used.
    i need ur help on this.
    i need the distinct list of infocubes and DSO

    guys, 80% of my problem got solved.
    here is the solution list as u all have suggested and that i have checked it also.
    RSDCUBEIOBJ     - infocube list for any nav-attr 
    RSDODSOATRNAV  - DSO list for any nav-attr
    ODSOIOBJ. - DSO list for any infoobj
    but in these tables, one thing i observe is that each infocube/DSO name is repeated multiple times. why is that? from where it populate?

Maybe you are looking for

  • Output of a "report_attribute_error_message" in a sorted ALV does not work!

    Hi all/SAP, in my thread editable ALV - how to throw an error message for a specific line & field I figured out, that the output of a "report_attribute_error_message" in the ON_DATA_CHECK event of an editable ALV does not work, if sorting is active f

  • How do I get apps from my MacBook pro to my ipad

    How do I get apps from my MacBook pro to my ipad

  • How do I maximise working Window in OSX?

    I'm using a 12' Powerbook (Tiger) and would like to stretch every working window to its maximum size and move it up and over to touch the screen edges. In most programs it is detached from the finder toolbar (top of screen. This is a real pain! Is th

  • Fixed PR in MRP

    Hello Friends, In SAP book it is written that in MRP system considers firm planned order and firm purchase requisition as part of availbale stock. Now I have a material which has VB as MRP type and reorder point is 100 and for this material there is

  • Is my library too big or my folder hierarchy inefficient

    Just reread the bagelturf article on lib size. My library has 2500 images (masters are referenced) and it is 3.78GB. This works out at 1.5MB per image which seems to be three times the suggested size in bagelturf. I wonder if my use of blue folders i