How to pull a last DML done on any table

Hi Gyans,
Is there a way for to pull the last DML done on any table, using normal sqlplus - if not then let me know the tool which you can use to do the same.

Have you gotten ora_rowscn to work ?
SQL> select scn_to_timestamp(max(ORA_ROWSCN)) from TABLE1;
SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN))
22-SEP-08 01.13.30.000000000 PM
SQL> insert into table1 values(8);
1 row created.
SQL> select scn_to_timestamp(max(ORA_ROWSCN)) from TABLE1;
SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN))
22-SEP-08 01.13.30.000000000 PM
SQL> alter system switch logfile;
System altered.
SQL> select scn_to_timestamp(max(ORA_ROWSCN)) from TABLE1;
SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN))
22-SEP-08 01.13.30.000000000 PM
SQL> select sysdate from dual;
SYSDATE
23 SEP 2008 17:05:07

Similar Messages

  • How to find the last DML timings on any particular table in oracle 10g?

    Hi All,
    I need to know in one particular table when the last DML operation happen and what is the dml query ?
    Thanks
    Bala

    Hi;
    Please see:
    find last dml operation time on a table
    find last dml operation time on  a table
    Last DML time
    find last dml operation time on  a table
    time of last DML
    Regard
    Helios

  • Sir,how to find the last DML operations

    Hi,
    Please tell me how to find the last DML Operations at least minimum 30 queries.
    Thanks in advance,

    Shared Pool is a memory location in SGA that contains SQL Statement that are submitted to Oracle for execution. This area is common to the entire database. Its not specific to user.
    So what ever Unique SQL statement that is submitted to the SQL Engine will be available here. Shared Pool has a size limit. That is defined by the parameters SHARED_POOL_SIZE and SHARED_POOL_RESERVED_SIZE. So when the Shared pool becomes full the data needs to be removed from it. That is done in FIFO basis.
    Oracle provides a visibility to this area through dictionary view V$SQLAREA. So this view will not only contain the SQL executed by you but also by every one. Even the one executed by oracle itself.
    So in my opinion what you are asking is not possible to get. You must have some logging mechanism in your application to get this information.

  • How to find the last executed date of any program?

    <<Frequently asked questions. So search>>
    How to find the last executed date of any program?
    is there any system variable or function module?
    Edited by: Matt on Oct 5, 2010 12:48 PM

    check the transaction STAD.
    Prabhudas

  • Last transaction date on any table for monitoring operation on it

    Hi All,
    I will be very thankful to you, if suggest some method for knowing the
    latest date-time of dml operation on any table.
    best rgds

    Investigate LogMiner @ OTN. How to use it depends greatly on your Oracle version.
    If you have a very specific need to know this for some very specific tables, you are better off writing triggers and writing some logging information to a table.

  • How to get the last inserted record from a table ?

    :-) Hiee E'body
    I work on Oracle 8i and need to get the last
    record inserted in a table.
    I have tried using rownum and rowid pseudo-columns
    but that doesn't work.
    Can you please help me out ?
    :-) Have a nice time
    Vivek Kapoor.
    IT, Atul Ltd.,
    India.

    I'm not sure about 8i features.
    I assume here that you don't have 'Date-Time' stamp columns on the table which is the easiest way to determine the last inserted row in the table.
    If not try the following :-
    select address, piece, SQL_TEXT
    from V$SQLTEXT
    where upper(sql_text) like '%INSERT INTO TABLE_NAME%'
    Substiute the TABLE_NAME with the name of the actual table.
    Have fun.
    Regards,
    Shailender
    :-) Hiee E'body
    I work on Oracle 8i and need to get the last
    record inserted in a table.
    I have tried using rownum and rowid pseudo-columns
    but that doesn't work.
    Can you please help me out ?
    :-) Have a nice time
    Vivek Kapoor.
    IT, Atul Ltd.,
    India.

  • How to get the last row of a database table.

    HI ,
    I want to get record exactly from the last row of a database table.
    How is that possible?

    Hi,
    To fetch last record from an internal table, just do find the number of records in it and read using index.
    DESCRIBE TABLE ITAB LINES L_LINES.
    READ TABLE ITAB INDEX L_LINES.
    You can also use LOOP .. ENDLOOP but the above method is better (performance wise).
    using LOOP .. ENDLOOP.
    LOOP AT ITAB.
    **do nothing
    ENDLOOP.
    **process ITAB (Header record of ITAB).
    **after ENLOOP, ITAB will have the last record of the internal table.
    [here ITAB is internal table as well as header record.]
    But what is the requirement?
    If you are looking for the current record of an employee then you can use ENDDA = HIGH_DATE.
    My advice is to review your requirement again and try to fetch only that record which you need.
    Mubeen

  • How to find out last updatde timestamp for a table

    Hi All,
    I want to find out the last updated time stamp of a table. Is there some thing available with the sys tables. Is there something can be done with user_objects.
    Or, is there any need to write pl/sql code to get the last updated timestamp for a table.
    Please provide some inputs.
    regards,
    Naresh

    Hi Oleg,
    Select * from user_objects.I belieive it gives you the last_ddl_time not the time a update or delete was done.
    Not sure if we have this feature in any new release.
    I am working on Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    to the OP
    I will suggest if you planto audit then use the audit feature based on your DB version.
    Or to make it more simple have a column called modified_date and update this column whenever you update the record.
    Regards,
    Bhushan

  • How to get the last record of an internall table ....

    Hi All..
    i want to get the last record of an internal table itab, and i want the the value of the last record.

    Hi,
         Use describe statment.
    data: lv_line type i.
        Describe table itab lines lv_line.
        read table itab into wa_itab index lv_line.
    regards,
    Santosh Thorat

  • How to pull multiple lines of info from a table for a Specific Company/Address

    What I would like to do is have one Table that I enter all my information on in Numbers for incoming rent like the one below. Since I have 8 spaces to rent I will have up to 96 plus rows of information to look at. But I would like to have Numbers then on separate pages is have the individual Companies have their own rent break down on a table with the Date Recieved and the amount they payed. From there on their separate page I can have the Late Charges come into play or whatever I choose.
    Date
    Company
    Address
    Rent Recieved
    Jan 1, 2011
    X
    430
    $1,100.00
    Jan 3, 2011
    Y
    440
    $1,200.00
    Jan 5, 2011
    Z
    450
    $1,300.00
    Feb 1, 2011
    Y
    440
    $1,200.00
    Feb 3, 2011
    X
    430
    $1,100.00
    Feb 8, 2011
    Z
    450
    $1,300.00
    Mar 1, 2011
    Z
    450
    $1,300.00
    Mar 2, 2011
    X
    430
    $1,100.00
    Mar 5, 2011
    Y
    440
    $1,200.00
    The following table would be on the separate page with the formula (I do not know how to write) grabbing the info from the above table.
    Company X Rent Recieved
    Date
    Rent Recieved
    From the formula that one of you gracious smart people provide I could create a table for each of the Companies that rent from me on their own Tables on separate Tabs.
    I know I could go to each individual Tab and write it in but I will be primarily working on my iPad and this would make it easier. I can also utilize the fresh Tables to do other calculations.

    I got a soluce with no swap.
    I created a new column (E)
    In E2, the formula is :
    =B&IF(ISBLANK(A),"",MONTH(A))
    Apply Fill Down
    In table of each company, I inserted a 2nd header row so that I may store the name of the company in A1.
    In A3, the formula is :
    =IFERROR(OFFSET(Tableau 1 :: $A$1,MATCH($A$1&ROW()-2,Tableau 1 :: $E,0)-1,0),"")
    in B3, the formula is :
    =IFERROR(OFFSET(Tableau 1 :: $D$1,MATCH($A$1&ROW()-2,Tableau 1 :: $E,0)-1,0),"")
    Select A3:B3 then Fill Down.
    That's all folks !
    Yvan KOENIG (VALLAURIS, France) jeudi 19 mai 2011 17:18:32
    Please :
    Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How to check mass change(vendor) done by any particular user .

    Hi,
    What is a transaction used  to check mass change(vendor) done by any particular user .
    Thanks,
    Dharmesh

    HI
    pls try this table CDHDR
    Thanks & Regards
    Phaneendra

  • How to get the last update time for a table ?

    I want to know the last change of the table data , for example, a record has been changed, how can i get that time?
    Regards,
    Lament

    Hello
    check the tables CDHDR & CDPOS
    But the condition when u r checking the these table.for a particular field the at data element level- futhur charactestictab level we have one check box called change document it as tick
    Thank u,
    santhosh

  • How to identify the last instance of a dynamic table row

    Hi all,
    I am trying to figure out how to create an action for my form in Livecycle Designer ES2 that will affect the most recent instance of a dynamic table row. I have a table with a repeatable row where the user will enter information about a purchased part and I have buttons that allow the user to add and remove rows. I need to create an additional add row button that will add a new instance of the repeatable table row (this is not an issue) and will disable and change the background color of the first cell in the added row. The problem I am having is how to have an action that affects the last instance of a row.
    If anyone knows how to do this in Javascript I would appreciate some advice/help.

    Hi,
    I think this is beyond what an action will provide. You will a have to write some JavaScript directly.  When you call the addInstance method it returns the new row, so you can do something like;
    var row = Table1._Row1.addInstance();
    row.TextField1.border.fill.color.value = "255,0,0";
    row.TextField1.access = "protected";
    To find the last row and do the same thing you can do something like;
    var row = Table1.resolveNode("Row1[" + (Table1._Row1.count - 1) + "]");
    row.TextField1.border.fill.color.value = "255,0,0";
    row.TextField1.access = "protected";
    Regards
    Bruce

  • How do i select last 5 minutes data from table

    there is table called 'x' which has cron job set of interval=5 min,i want to select last 5 min data and delete rest of the data in it or save in one of the table say 'y'.how do i going to do it???kindly help out please??
    Edited by: user10341747 on Sep 24, 2008 10:20 AM

    this is just explanation of other members reply
    insert into Y
    select * from X where timestamp_variable between systimestamp - 5/(24*60) and systimestamp
    this select gives last 5 min data out of that table x .
    members can correct me if iam wrong.
    Thank you.

  • Select the last saved records in a table

    I all
    I have this struct in a table
    create table INT_OBJ
    IDOBJ NUMBER(15) not null,
    IDERP NUMBER(15),
    IDE NUMBER(15),
    CPO VARCHAR2(20),
    VLR VARCHAR2(2500),
    VLRC VARCHAR2(2500)
    How to Select the last saved records in a table. I think usea a temp table for put the last row read and begin to read in the next row.
    The table is reading each four hours.

    Theoretically it can be done with ORA_ROWSCN and enabled ROWDEPENDENCIES, but there are so many nuances, so only adding column for ordering is right.
    Regards,
    Sayan Malakshinov

Maybe you are looking for