DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: User name or user id

  1. #1
    Join Date
    Dec 2000
    Posts
    9

    Arrow

    Hi

    I saw some SQL Queries in the V$SQLAREA. By curiousity sake just I wanted to find out the USER who executed those queries in that database.

    Could any one help me!

    Thanks
    Surya

  2. #2
    Join Date
    Jun 2000
    Location
    Conway,AR,USA
    Posts
    29
    Try
    SELECT a.username,b.sql_text
    from v$session a,
    v$sqlarea b
    where a.sql_address = b.address
    and a.username not in (' ','ORACLE','SYS')
    /
    Soumya
    still learning

  3. #3
    Join Date
    Dec 2000
    Posts
    9
    Hi

    I used the query, but all the users will use the same user name. For ex: All the 90 Users uses the same log in user_id and Password to the database.

    How to find out the particular user who executed those queries out of 90 users who are having the same user_id and password to connect the database?

    Thanks
    Surya

  4. #4
    Join Date
    Jun 2000
    Location
    Conway,AR,USA
    Posts
    29
    Try
    SELECT a.username,a.osuser,a.terminal,b.sql_text
    from v$session a,
    v$sqlarea b
    where a.sql_address = b.address
    and a.username not in (' ','ORACLE','SYS')
    In that case you can identify individual user of the SQL
    Soumya
    still learning

  5. #5
    Join Date
    Dec 2000
    Posts
    9
    Hi Soumya

    I executed the query, but I am seeing the results only who are now in the v$session.

    But my question is , I want to find out the user who executed the queries very long time ago which are there in the V$SQLAREA .

    Thanks Soumya
    Surya

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width