finding last dml done in database
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: finding last dml done in database

  1. #1
    Join Date
    Mar 2001
    Posts
    16

    finding last dml done in database

    is there a command to find out what was the last dml statement done in the database ?

  2. #2
    Join Date
    Feb 2001
    Posts
    203
    I think slothfur asking last sql statement(dml) executed in the database.

    slothfur,

    If it's correct then try to use logminer, If you add the current
    log file and if you select based on date, Then you may able to get
    last sql statement informaiton.

    If you are intrested on logminer then let me know, I can help you some more.

    Good Luck.

    Sree.
    sree

  3. #3
    Join Date
    Jul 2002
    Location
    Washington DC
    Posts
    110
    Try the follsowing query.


    select a.address,a.PIECE,a.sql_text ,b.logon_time from v$sqltext a,v$session b
    where b.sql_address=a.ADDRESS
    and trunc(logon_time) =trunc(sysdate)
    order by a.address,a.PIECE ,b.logon_time

  4. #4
    Join Date
    Jul 2000
    Posts
    119
    It can be as simple as this :
    select sql_text, hash_value, first_load_time from V$sqlarea order by first_load_time desc ;

    This should give you all latest SQL that ran in the database..
    In case you want to dig deep, get the hash value and find in sql_text as

    select sql_text fromk v$sql_text where hash_value = &hash_value order by piece;
    OCP 8.0, 8i, 9i

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