Log changed data in tables

hi
I want to hold change data information.
For example I have table student and one row is inserted.
Then somebody else changed the name of the student name and phone number.
I want to hold the changed columns when an update query is executed.
I looked at change data capture but I think it is about data warehouses and there are 2 databases in that case.
I do not want to write triggers for all tables.
I looked at fine grained auditing but I can take the update statement only, I do not know how can I find the changed columns, column's last data and new data.
How can I do it? Which topic should I research?
Can you lead me?
Good Works

[Flashback Query|http://www.oracle-base.com/articles/9i/FlashbackQuery.php] may be possible. but, There are some restrictions for Flashback query.
[http://www.oracle-developer.net/display.php?id=210]
[http://www.dbasupport.com/oracle/ora9i/flashback_Query.shtml]
[http://www.dbasupport.com/oracle/ora9i/flashback_Query2.shtml]
[http://www.dbasupport.com/oracle/ora9i/flashback_Query3.shtml]
Last option is log Minor.

Similar Messages

  • Logged changes in Custom Table

    Hi Gurus,
    Need the Transaction code to check logged changes in Customizing Table ....... Something Like V_T510N...
    ...Need to know the USER ID who changed the table......
    NOTE: THIS IS FOR CUSTOMIZING TABLE....Not INFOTYPE or PA Table.
    Kumarpal Jain.

    Hi
    Check SM30->View of your Custom Table Name->Utilities -> change logs.
    Check Tables : CDHDR and CDPOS also.
    Regards,
    Sreeram

  • Oracle Trigger to log changes in a table

    I have a situation where if a new record is created or a modification to a table is made all details of these changes are logged. For example
    A change is made in a customer table, from
    Customername - Andrew
    Customerid - 1
    to
    Customername - John
    Customerid - 1
    The changes would be logged in a separate table of the following format
    TableType - The table the edit or new record appeared in
    Username - The user that made the change
    ChangeDate - Date of change
    Uniqueid - Customer id
    change type - the type of change add or modify
    colname - the column name affected by the change
    oldvalue - the old value
    newvalue - the new value
    therefore for the above example the logtable would be populated as follows:
    TableType - Customer
    Username - athompson
    ChangeDate - 17/01/06
    Uniqueid - 1
    change type - modify
    colname - customername
    oldvalue - andrew
    newvalue - john
    Ok that sums up the aim, all im wondering is if this is possible using Oracle Triggers?
    Any help, advice or possible solutions would really be helpful as im a bit of a trigger newbie :P
    cheers
    AndyT

    Ah okay, the system has been designed and built before all requirements are known and understood and now cannot be changed. This is a common reason for using triggers as a kludge to fill the gaps in the application after the fact.
    Based on the low usage though you should probably be okay, hopefully this will help get you started.
    Also see the SQL and PL/SQL Reference guides
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm
    SQL> create table t (n number);
    Table created.
    SQL> create table t_log (table_name varchar2(30),
      2    username varchar2(30), change_date date, change_type varchar2(10),
      3    old_value number, new_value number);
    Table created.
    SQL> create or replace trigger t_after_row
      2  after insert or update on t
      3  for each row
      4  declare
      5    l_type varchar2(10);
      6  begin
      7
      8    if updating then
      9      l_type := 'MODIFY';
    10    elsif inserting then
    11      l_type := 'ADD';
    12    end if;
    13
    14    insert into t_log
    15      (
    16      table_name,
    17      username,
    18      change_date,
    19      change_type,
    20      old_value,
    21      new_value
    22      )
    23    values
    24      (
    25      'T',
    26      user,
    27      sysdate,
    28      l_type,
    29      :old.n,
    30      :new.n
    31      );
    32
    33  end;
    34  /
    Trigger created.
    SQL> insert into t values (1);
    1 row created.
    SQL> insert into t values (2);
    1 row created.
    SQL> update t set n = 3 where n = 1;
    1 row updated.
    SQL> select * from t_log;
    TABLE_NAME   USERNAME     CHANGE_DAT CHANGE_TYP  OLD_VALUE  NEW_VALUE
    T            TEST         01-19-2006 ADD                            1
    T            TEST         01-19-2006 ADD                            2
    T            TEST         01-19-2006 MODIFY              1          3
    SQL>

  • Gathering information on which users have changed data in tables

    hi,
    Have a 9.2.0.7 database. today someone made a change to some tables. Is it possible to track which user did this.
    Statspack is not running. I understand that logminer will be able to show me the data changes (I think) but what about the user?
    thanks

    [Flashback Query|http://www.oracle-base.com/articles/9i/FlashbackQuery.php] may be possible. but, There are some restrictions for Flashback query.
    [http://www.oracle-developer.net/display.php?id=210]
    [http://www.dbasupport.com/oracle/ora9i/flashback_Query.shtml]
    [http://www.dbasupport.com/oracle/ora9i/flashback_Query2.shtml]
    [http://www.dbasupport.com/oracle/ora9i/flashback_Query3.shtml]
    Last option is log Minor.

  • How to save history change data on table

    Hi all
    I'm using Oracle Database 11g
    Data of tables often is changed. I want to save history person changed it.
    Anybody help me!
    Thankyou
    Thiensu2810

    Hi
    you can use
    flashback data archieve
    CREATE FLASHBACK ARCHIVE DEFAULT test_archive1
    TABLESPACE example
    QUOTA 1 M
    RETENTION 1 DAY;
    CREATE FLASHBACK ARCHIVE test_archive2
    TABLESPACE example
    QUOTA 1 M
    RETENTION 1 DAY;
    The next statement alters the default flashback data archive to extend the retention period to 1 month:
    ALTER FLASHBACK ARCHIVE test_archive1
    MODIFY RETENTION 1 MONTH;
    The next statement specifies tracking for the oe.customers table. The flashback data archive is not specified, so data will be archived in the default flashback data archive, test_archive1:
    ALTER TABLE oe.customers
    FLASHBACK ARCHIVE;
    The next statement specifies tracking for the oe.orders table. In this case, data will be archived in the specified flashback data archive, test_archive2:
    ALTER TABLE oe.orders
    FLASHBACK ARCHIVE test_archive2;
    The next statement drops test_archive2 flashback data archive:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5009.htm#SQLRF20008
    hope this helps
    Zekeriya

  • Logging changes in any table

    Hi,
    Is it possible to track changes in a schema by writing own code? What i want to achieve is to write something that will 'catch' any insert or update to any table in my schema and writes a log to my table.
    Thank you very much
    lubos

    Here is what SAP says as a F1 help on the logging flag in technical setting of a table..
    Log data changes
    The logging flag defines whether changes to the data records of a table should be logged. If logging is activated, every change (with UPDATE, DELETE) to an existing data record by a user or an application program is recorded in a log table in the database.
    Note: Activating logging slows down accesses that change the table. First of all, a record must be written in the log table for each change. Secondly, many users access this log table in parallel. This could cause lock situations even though the users are working with different application tables.
    Dependencies
    Logging only takes place if parameter rec/client in the system profile is set correctly. Setting the flag on its own does not cause the table changes to be logged.
    The existing logs can be displayed with Transaction Table history (SCU3).

  • Changing data in table level

    Hi friends,
    I want to change the address of ship to party in delivery document and billing document, table level. So anyone can tell me what is the table and fields name to change the address in delivery document and billing document. In LIKP and VBRK I am not able to find the fields. In VL03N main screen below to outbound delivery, ship to party will be there, right to that ship to party name will be there, right to that address button will be there. If you press that we will get the address of ship to party. I want to change the data in that? So I need the table and field of that
    Anyone can help me out?
    Ramesh

    Hi,
    This address actually comes from customer master for partner function WE .
    But in sales order and delivery u can change the address in VA02 and VL02N tcode by going thru the steps u have mentioned .
    Generally in Sales order we can do the chnages and then thru copy control this data from sales order flows to subsequent doc . So u can chnage it in sales order in chnage mode it will be available in Delivery and Invoice.
    In case u don't want to chnage it in sales order but u want to chnage in Delivery then VL02N and then chnage .
    Hope this help

  • Changing data in table

    hello experts
                  i have to modify the field value zcount to 2 if zsearch contains value 'yes'in the table zstatus.which is in the active state.please tell me the process of changing the values without creating program.
    thanks in advence.
    regards
    giri.

    U can do that using SM31 but selecting the table Zstatus
    and using the option to enter condition
    you can than select the field zsearch as your condition field. It will ask you for the filter value in which you can give it as Yes...
    It would popup with the records from the table zstatus with zsearch as Yes...here you can change the field zcount to 2.

  • Regarding Changing data in Table Maintanance Generator

    hi all,
        I Created one Z Table for Five fields Sales District( BZIRK) , Sales District Description (BZTXT) , Vendor No , Vendor Name and Person Incharge. I Created Table Maintanance Generator for five fields.
        In my ZTable after giving Vendor No when i enter Vendor Name is coming automatically and record is Created.For these i used Event No 5.
    When i am going again and When I change Vendor No When I Press enter Vendor No is not coming automatically. 
    Which Event Should i use.
    How can i achieve this . Plz send detailed process.
    Please suggest.
    Regards
    Rami

    Hi,
    Please eloberate u r question. and give some code.
    Regards,
    Nandha

  • Change Data Capture How to Tell which you are running Sync or Asyn

    Hi ,
    I am taking over a new system that has change data capture running, but Im really confused how this is running. Most of the CDC is set up using Sync(triggers), but I have about 5 tables that DO NOT have system generated triggers on them. I know Streams is NOT running/configured. I know Capture is not running/configured (because nothing in DBA_CAPTURE table). I can tell that these 5 tables are still getting updated in the change table schema. I can not figure out how the 5 tables that DO NOT have triggers on them are updating the change data set tables.
    I had thought the the 5 tables, must be configured with HOTLOG, but when I look at the CHANGE_SETS table they all (including these 5 tables) are set to CHANGE SOURCE NAME = SYNC SOUCE. I would expected that to be HOTLOG_SOURCE. So I "assume" they aren't set up using Asnc. hot log mode. So maybe the other Async modes are used, but not pushed to another database? Is that possible?
    Any other ideas on how to figure out how the CDC is set up for these 5 tables?
    thanks for your help.

    Thanks for the reply, but I think I must have not stated the problem clearly. I dont WANT to set the source I want to figure out how this CDC is working. I see ALL the sources are currently set to SYNC_SOURCE. Almost all of the tables are set up with system triggers on them, but 5 dont have system triggers, yet the source says SYNC_SOURCE. I did validate that the change tables are getting updated for these tables. my question is how are they getting updated? I "assume" since they dont have system triggers ont eh table they aren't synchoronus cdc (like the other tables are). yet the source says SYNC_SOURCE. What am I missing? How can I tell if the redo log is populating those changes tables? Im pretty sure it is (Becuase there aren't triggers or jobs running), but Im curious if there is a way to tell for sure.
    Thanks,

  • Roles with Change Access to Table Maintenance

    Hello,
    We have many roles that have S_TABU_DIS-Table Maintenance, 02-Change access, *-Auth. Group. Many of these roles have very few transactions and are not Basis\Development related. My questions are what transactions do I need to make sure these roles don't have to so they can't change data in Tables? I know SM30 and SE16, any others? Also second question, should I be worried if these roles do not have the access to start these transactions but do have the access given in the S_TABU_DIS object?
    Thank You,
    Alex

    1. Asides from SM30 and SE16 you already mentioned, 'SE16N' and 'N' come to mind. Maybe there are others.
    2. Yes. You should be worried. Users could get authorizations for any of the aforementioned transactions from another role and get authorization to change all the tables from this role. Bad Stuff.
    I suggest that you figure out why exactly these roles includes S_TABU_DIS object with change authorizations for all table groups. Once you have that figured out - you can take appropriate actions. In my mind, it would be very hard to justify having S_TABU_DIS with 02/* in any role.

  • Table for the report RPUAUD00  Logged Changes in Infotype data

    Hi
    I have a query with the program RPUAUD00 Logged changes in Infotype Data.  In which table stores the details of the program RPUAUD00.  for example in the 1st period there is a LWP record for the employee.  If in the 2nd period the LWP entered in 1st period has deleted, in the log the LWP displays for 1st period  new field contents, Action Indicator I.  The deleted information displayes in Old field contents with the Action Indicator D. We want to know in which table the LWP insert and LWP delete (d) details are stored.
    This information required to create a report for ESI.  In the report No of days (payroll processed for) has to mention.  To know the no of days need to access the report RPUAUD00.  From the RPUAUD00 the details of LWP insert and delete can be known.
    Request to help in solving the issue
    Thanks & Regards
    EKP Yadav

    Hello:
    Logged changes in Infotype Data are stored in cluster table PCL4 ID  LA and SA for employee and LB and SB for applicant. Maybe L is for longterm and S for shorterm
    Cheers.
    Antoine

  • URGENT: What table stores data for logged changes in PA and PD??

    Thanks!!!

    Hi Scott,
    Thanks for the reply.  This transaction leads to the report that allows you to display logged changes in PA, but I need the table name where these changes are actually stored for PA and the other table where change documents are stored in PD.
    Regards,
    -Joe

  • Change logs not available for tables

    Hi Experts,
    Is there any change logs available for the  tables PCEC, FTXP, T030
    We need to add logs so that we can keep track of the changes.
    Please let me know if someone knows the solution.
    Regards,
    Srinivas

    Dear Srinivas,
    Go to SE11 and key in your table, then select Display.
    In the top, you will be able to see Technical Settings Button. click on it.
    It will show you the technical details for that table.
    There will be an indicator at the bottom LOG DATA CHANGES.
    If this indicator has been set, then only the changes will be recorded.
    For change log, you shall make use of the transaction SCU3.
    AUT10 shall also be used.
    thank you
    Venkatesh

  • CDC (Change Data Capture) with 2 Tables

    Hello,
    i want to use the change data capture for the typical Data Warehousing progress (bring the new or updatet table from source to the staging area)
    So i have implemented a mapping with to tables. The source table is S_Account, the target or staging table is W_Account_DS.
    I have connected/mapped the tables and in the next step i goes into property inspector of W_ACCOUNT_DS into the Area Change Data Capture --> Change Data Capture Filter and put into the follow expression Builder
    Select *
    from S_Acccount
    where INOUTGRP1.LAST_UPD_DT = CURRENT_DATE (<-- Validation Succesful)
    and the next Step i make Enabeled is true in the Change Data Capture Area. So i think it should ready for one test case.
    I set in SQL Developer with an update statement the LAST_UPD_DT at 28.03.2012 in this case he should not update/insert anything, right? But he insert the full table.
    I set in SQL Developer with an update statement the LAST_UPD_DT by 2 Columms to 28.03.2012 in this case he should update he should update the full table - 2 columns with the date 28.03.2012, right?
    So what make i wrong or have i forgotten anything? (must set keys by the tables? I think not! If yes why?)
    Must i set anything properties else? Why doesnt´work it?
    I look forward for your replies :)

    Setting up CDC is a fairly complex process with different options. Setting just the filter in OWB is only a very small part.
    There is a blog post below on how to use code templates to do CDC which gives some insight;
    http://www.rittmanmead.com/2009/10/changed-data-capture-and-owb11gr2/
    Plus and older one illustrating how to use Oracle logs;
    http://www.rittmanmead.com/2006/04/asynchronous-hotlog-distributed-change-data-capture-and-owb-paris/
    Cheers
    David

Maybe you are looking for