How to track changes on the table not using triggers

Hi,
I would like to track DML changes on the tables. As I have many tables it is not efficient to write triggers.
Is there any setup I can do at database level.
I am using 11g R2.
Thanks

thanks fran.
I would like to know old and new data in case of updates. This method will not show me.are you sure??
SQL> sho parameter audit_trail
NAME                                 TYPE        VALUE
audit_trail                          string      DB, EXTENDED
SQL> audit select, insert, update on fran.test1;
AuditorÝa terminada correctamente.
SQL> conn fran/fran
Conectado.
SQL> select * from test1;
ninguna fila seleccionada
SQL> insert into fran.test1 values('EX',2);
1 fila creada.
SQL> update fran.test1 set object_id=3 where object_id=2;
1 fila actualizada.
SQL> commit;
Confirmaci¾n terminada.
SQL> conn / as sysdba
Conectado.
SQL> select sqltext from aud$ where sqltext is not null;
SQLTEXT
select * from test1
insert into fran.test1 values('EX',2)
update fran.test1 set object_id=3 where object_id=2If you want more data, FGA is your goal
I have read some where on flashback database ..
would this create a replica table with old changesflashback database is to set the current data like in the past. I mean:
SQL> conn / as sysdba
Conectado.
SQL> alter table fran.test1 enable row movement;
Tabla modificada.
SQL> drop table fran.test1;
Tabla borrada.
SQL> select * from fran.test1;
select * from fran.test1
ERROR en lÝnea 1:
ORA-00942: la tabla o vista no existe
SQL> flashback table fran.test1 to before drop;
Flashback terminado.
SQL> select * from fran.test1;
OBJECT_NAME                    OBJECT_ID
EX                             3

Similar Messages

  • How to track changes on the directory server using the ChangeLog facility?

     

    The ldap search filter should read "cn=changelog"
    So the query should be something like
    ldapsearch -b "yourbase" -D "yourbind" -w passwd -s sub
    "cn=changelog"
    To make the output readabel, you may need the option -o if you use the iDS ldapsearch. If you use the Sun ldapsearch, the -o is not needed.

  • How to track personal details changes in the report without using triggers on the database tables

    Hi There,
    I'm having a requirement to track the oracle HRMS Personal details changes in the report not using the triggers.
    ex: if some changes the address of the person, then that changed values should be populated in the report.
    Please find below query:
    If any of the following columns data is updated, the new value should be populated in the report.
    SELECT PAPF.PERSON_ID                                                       PAPF_PERSON_ID
    ,      PAPF.EMPLOYEE_NUMBER                                               EMPLOYEE_NUMBER        
    ,      PAPF.FIRST_NAME                                                            FIRST_NAME   
    ,      PAPF.LAST_NAME                                                            LAST_NAME
    ,      TO_CHAR(PAPF.DATE_OF_BIRTH ,'DD-MON-YYYY')     DATE_OF_BIRTH
    ,      ADDR.ADDRESS_LINE1                                                   ADDRESS_1
    ,      ADDR.ADDRESS_LINE2                                                   ADDRESS_2
    ,      ADDR.ADDRESS_LINE3                                                   ADDRESS_3
    ,      ADDR.TOWN_OR_CITY                                                    TOWN
    ,      ADDR.REGION_1                                                              COUNTY
    ,      ADDR.POSTAL_CODE                                                     POST_CODE
    ,      ADDR.COUNTRY                                                              COUNTRY
    ,      PAY.PAYROLL_NAME                                                     PAYROLL_NAME
    ,      PLN_TYP.NAME                                                              PLAN_TYP
    ,      PLN.NAME                                                                     PRODUCT_NAME
    ,      BOF.NAME                                                                     COVERAGE
    FROM   PER_ALL_PEOPLE_F                                                PAPF
    ,      PER_ALL_ASSIGNMENTS_F                                          PAF
    ,      PER_ADDRESSES                                                        ADDR
    ,      PAY_PAYROLLS_F                                                       PAY
    ,      BEN_PRTT_ENRT_RSLT_F                                                 PEN
    ,      BEN_PL_TYP_F                                                         PLN_TYP
    ,      BEN_PL_F                                                             PLN
    ,      BEN_OIPL_F                                                           BOIPF
    ,      BEN_OPT_F                                                            BOF
    WHERE 1                                     = 1
    AND PAPF.PERSON_ID                          = PAF.PERSON_ID
    AND TRUNC(SYSDATE)                          BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE
    AND TRUNC(SYSDATE)                          BETWEEN PAF.EFFECTIVE_START_DATE AND PAF.EFFECTIVE_END_DATE
    AND PAPF.PERSON_ID                          = ADDR.PERSON_ID
    AND ADDR.PRIMARY_FLAG                       = 'Y'
    AND ADDR.DATE_TO                            IS NULL
    AND PAF.PAYROLL_ID                          = PAY.PAYROLL_ID(+)
    AND PEN.PERSON_ID                           = PAPF.PERSON_ID
    AND PEN.BUSINESS_GROUP_ID                   = PAPF.BUSINESS_GROUP_ID
    AND TRUNC(SYSDATE)                          BETWEEN TRUNC(PEN.EFFECTIVE_START_DATE) AND TRUNC(PEN.EFFECTIVE_END_DATE)
    AND PEN.PRTT_ENRT_RSLT_STAT_CD              IS NULL
    AND PEN.SSPNDD_FLAG                         = 'N'
    AND ( PEN.ENRT_CVG_THRU_DT                  >= TRUNC(SYSDATE)
    OR    PEN.ENRT_OVRIDN_FLAG                  = 'Y')
    AND EXISTS(SELECT PIL.PER_IN_LER_ID
               FROM   BEN_PER_IN_LER PIL
               WHERE  PIL.PER_IN_LER_ID         = PEN.PER_IN_LER_ID
               AND    PIL.BUSINESS_GROUP_ID     = PEN.BUSINESS_GROUP_ID
               AND    PIL.PER_IN_LER_STAT_CD    NOT IN ('VOIDD','BCKDT'))
    AND PEN.PL_TYP_ID                           = PLN_TYP.PL_TYP_ID  
    AND TRUNC(SYSDATE)                          BETWEEN PLN_TYP.EFFECTIVE_START_DATE AND PLN_TYP.EFFECTIVE_END_DATE  
    AND PLN_TYP.PL_TYP_ID                       = PLN.PL_TYP_ID 
    AND TRUNC(SYSDATE)                          BETWEEN PLN.EFFECTIVE_START_DATE AND PLN.EFFECTIVE_END_DATE
    AND PLN.PL_ID                               = PEN.PL_ID
    AND PEN.OIPL_ID                             = BOIPF.OIPL_ID(+)
    AND TRUNC(SYSDATE)                          BETWEEN NVL(BOIPF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOIPF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
    AND BOIPF.OPT_ID                            = BOF.OPT_ID(+)
    AND TRUNC(SYSDATE)                          BETWEEN NVL(BOF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
    AND (:P_SYSDATE)                            BETWEEN TRUNC(PEN.ENRT_CVG_STRT_DT) AND TRUNC(PEN.ENRT_CVG_THRU_DT)
    AND (CASE WHEN :P_PAYROLL_ID IS NULL THEN 'Y' ELSE NVL((SELECT 'Y' FROM DUAL WHERE PAY.PAYROLL_ID  = :P_PAYROLL_ID), 'N') END) = 'Y'
    AND PAPF.LAST_UPDATE_DATE                   = (:P_SYSDATE) ;
    --AND PAPF.LAST_UPDATE_DATE                   BETWEEN to_date(:P_SYSDATE) and (to_date(:p_sysdate) + INTERVAL '31' Day);
    --AND (:P_SYSDATE)                           = PAPF.LAST_UPDATE_DATE ;
    Thanks

    check this -
    Re: Best Event-Based notifications for Sox Complience?

  • How to track changes for the config done directly in quality client-Reg

    Hi,
    In our system the landscape is Dev,Quality,Production.
    For some transactions we will do the config in dev and transport to other clients or maintain in each client manually.Eg QS41,CI41.
    In my case ,I have did the config in CI41 and transported to other clients.But someone user get in to CI41 in Quality client and did some changes. Now how to track the user Id through which the changes has been performed  in QA directly.
    Regards
    SB

    hi
    you can use SE09 for displaying the transport no where you can see all the request nos ,from there you can check
    also use the same transaction Cl41 do some changes like description ,then press the save button ,system will prompt you the previous saved Request No and make a note of it .cancel the request generation ,then you can trace them in SE09
    also check whether you can find any change documents is available
    regards
    thyagarajan

  • How to track changes to config tables?

    Hi,
    I would like to track the changes that have been done to the config tables and would like to know the name of the transport request which might have done this?
    My SAP is on ECC 5.0
    Can some one please help?
    Thanks
    Vijay

    Hello Vijay,
    In SPRO transaction, you have an option to view change logs , you can use this option.
    In SPRO->SAP Reference IMG and then drill down to the customizing you are interested in.
    Click on that node and click on the Change Log button.
    The rest is self explanatory.
    Later when you find the table name of the affected config.
    You can take the table name and search for the object in transaction SE03 -> Objects in Request -> Search for Objects in Request
    Regards,
    Siddhesh

  • How to track changes in a custom table

    HI all,
       Requirement is
    1. In custom table instead of using table maintence generator ALV gird has to be display to see table entries. But where i have to write the code when user press CONTENTS button?
    2. In alv gird there shuld be one button which shows the change history of selected record and modify the content of selected record. For track changes i have registered custom table name in SCDO. so that changes made will reflect in CDPOS/CDHDR.
    but how can i track changes thru dis table? i didnt find field contents of custom table in CDPOS/CDHDR tables?
    Please help me with these Ques.

    Hello,
    SAP has provided many changes tracking related programs for Sales order, Vendor changes etc.
    They all use the standard function Module
      call function 'CHANGEDOCUMENT_READ_HEADERS'
    call function 'CHANGEDOCUMENT_READ_POSITIONS'
    so with these you can get the changed records
    Let me know if this helps you
    Thanks and Regards
    Pushkar Joshi

  • Custom change document is not tracking changes for SAP tables

    Hi gurus,
    I have created a custom change document for tables EKBE and KONV. But the change document is not tracking changes in BDCP table for changes in EKBE or KONV.
    Please help me out.........

    HI,
    Use this link for change pointers concept.
    change pointers
    let me know if u have any issue.
    ~linganna

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • How do i set the background of the table( not of cell / row / column).

    How do i set the background of the table( not of cell / row / column).
    What happens when i load the applet the table is blank and displays the background color is gray which we want to be white.
    We tried using the setBackGround but it is not working maybe we are not using it properly. Any help would be gr8.
    Thanks in advance.

    I don't understand very well, but i guess that the background is gray when the table content's empty, isn't it?
    When the table model is empty, the JTable doesn't paint, so its container displays its background (often gray).
    In this case, what you must do is force the table to paint, even if the model is empty. So, you have to create your own table and override three methods :
    public class MyTable extends JTable
    //specify the preferred and minum size when empty
    myPreferredWidth = 200;
    myPreferredHeigth =200;
    myMinimunWidth = ...;
    myMinimunHeigth = ...;
    public Dimension getPreferredSize()
    if(getModel().getRowCount() < 1)
    return new Dimension(myPreferredWidth, myPreferredHeigth);
    else
    return super.getPreferredSize();
    public Dimension getMinimumSize()
    if( getModel().getRowCount() > 0)
    return new Dimension(myMinimunWidth, myMinimunHeigth);
    else
    return super.getMinimumSize();
    protected void paintComponent(Graphics g)
    if (getModel().getRowCount<1 && isOpaque()) { //paint background
    g.setColor(Color.white);
    g.fillRect(0, 0, getWidth(), getHeight());
    else super.paintComponent(g);
    }

  • How to send  changes in the Database Table Periodically using Change Pointe

    Hi,
           How to send  changes in the Database Table to the external system Periodically using Change Pointers.
    Thanks & Regards,
    Gopi.

    That depends on what table you are referring to.

  • How to track changes on Infoprovider?

    Hi Gurus,
    Could you please provide the steps of how to track changes on Infoprovider? I had 4 Infocubes (belonging to the same info area) that contains compressed data - but now when I tried to display the data, all the cube are empty - no data were aechived.
    I would like to track any actions that were made on those cubes.
    Thanks

    thanks Kumar for helping me out here
    I tried RSD_CUBE_LOG_DELE function module - It came out "no logs found in the database"
    I tried tables RSDRDLOGHEADER and RSDDSTATDELE which provide me deletion informations like user name... but since we have partially archived those specific infoproviders in the same period of time where I think eveything was gone from cube, I am not able to related when and who the data that were not archived were deleted from Infocube
    Under manage Infocube --> archiving tab, all the created archiving request are only for certain dates (below 2006). I know that we had data above 2006.
    Kindly provide additional inputs.
    Thanks

  • How to track changes in inputs in a form?

    Dear Masters,
    I have an update page generated by dreamweaver which works correctly. But I need to implement something else additionally to my application developed in classical asp environment.
    I want to track changes in the form in my update page and save them to another table in ms sql database.
    My update page updates orders table but I want to save changing information to logdetail table in the database.
    One of the main problem is that even if i use a javascript code there is a problem like that if a user chose b from a and b couple and return to change a value again it is a problem. I need the final changing info.
    Another problem is that even if i determine the changing inputs (textfields and list/menus)  how can i insert in to logdetail table?
    Because my form updates order table when i press submit button. How can i do that?
    If someone can help me about that i  would be gratefull
    thanks in advance
    Ces

    The best way would be to create a trigger in the database that would update the history table whenever the data was changed. The next best would be to use a stored procedure. I would not try to do this with server side scripting.

  • How can i find out the table hierarchy

    Hi experts,
    I have one doubt. how can i find out the table hierarchy in the particular schema.
    Let me explain my requirement in detail.. In my Database i have nearly 250 table each table have it's own temporary table(for authorization purpose we are maintaining the temporary tables) for each day i have to clear the temporary table data.
    All temporary table connected with each other. i mean all the table having foreign key relationship.. while i attempt the delete the data from the temporary table it showed ORA-02292: integrity constraint  violated - child record found.
    So can any one please tell how can i delete the child table record first and then parent record table record.
    Thanks in advance
    Arun

    CREATE OR REPLACE FUNCTION get_child_tables (
    ptable VARCHAR2,
    powner VARCHAR2 DEFAULT 'SCOTT',
    plevel NUMBER DEFAULT 10
    RETURN stringarray
    -- -- create this ON SQL*PLUS "CREATE OR REPLACE TYPE STRINGARRAY AS TABLE OF VARCHAR2(50);"
    -- AUTHID CURRENT_USER
    PIPELINED
    AUTHOR DATE VERSION COMMENTS
    ======================================================================================
    [email protected] 26-OCT-2009 1.0 Developed to ease developers effort to find Nth level of Referential integrity
    ======================================================================================
    -- PURPOSE -> To find PARENT=> CHILD relational TABLE(S) in Oracle upto a depth max N Level.
    --SYNTAX TO USE
    SELECT * FROM TABLE( get_child_tables('DEPT','SCOTT',3)); Store this query in a file for your use
    SELECT * FROM TABLE( get_child_tables('EMPLOYEE')); Store this query in a file for your use
    -- RESULTS looks as below
    --1 => DEPT
    --2 => EMP
    --2 => EMP2
    --3 => EMP_CHILD
    --3 => EMP2_CHILD
    -- and so on
    --This can be leveraged to use in any oracle database REGION 10g having and above.
    --This FUNCTION gives formatted result of the Oracle 10g Hierarchical query result coded in the cursor
    --to find MASTER => CHILD relational TABLE(S) upto a depth max 10 Level.
    --The result of the PIPELINED function can be retrieved using Oracle new operator
    --TABLE(array name) in SQL query.
    --Due to the AUTHID CURRENT_USER compiler directive any user can use based on his/her access privileges on the database.
    --GRANT EXECUTE ON SCOTT.get_child_tables TO PUBLIC;
    --CREATE OR REPLACE PUBLIC SYNONYM get_child_tables FOR SCOTT.get_child_tables;
    IS
    atname stringarray := stringarray ();
    -- create this ON SQL*PLUS CREATE OR REPLACE TYPE STRINGARRAY AS TABLE OF VARCHAR2(50);
    vlevel NUMBER;
    vtname VARCHAR2 (50);
    nindex NUMBER := 0;
    bprocessed BOOLEAN := FALSE;
    CURSOR c1 (powner_in IN VARCHAR2, ptable_in VARCHAR2, plevel_in NUMBER)
    IS
    SELECT LEVEL, LPAD (' ', (LEVEL - 1) * 2, ' ') || pt AS "TNAME"
    FROM (SELECT a.owner w1, a.table_name pt, a.constraint_name c1,
    a.r_constraint_name r1, b.owner w2, b.table_name ct,
    b.constraint_name c2, b.r_constraint_name r2
    FROM all_constraints a, all_constraints b
    WHERE a.constraint_name = b.r_constraint_name(+)
    AND a.owner = b.owner(+)
    AND a.owner =
    UPPER (powner)
    -- Change Owner here while testing
    --AND A.r_constraint_name IS NULL
    AND a.constraint_type IN ('P', 'R')) v1
    START WITH pt =
    UPPER
    (ptable)
    -- Change your master table here while testing the QUERY
    CONNECT BY PRIOR ct = pt AND LEVEL <= plevel;
    -- Change lavel here while testing
    BEGIN
    atname.EXTEND;
    atname (1) := 'NOTHING';
    OPEN c1 (powner, ptable, plevel);
    LOOP
    bprocessed := FALSE;
    FETCH c1
    INTO vlevel, vtname;
    IF nindex > 1 AND atname (atname.LAST - 1) = vtname
    THEN
    --DBMS_OUTPUT.PUT_LINE('2 ==== vtname  ' ||vtname || '   '|| atname.count|| '   '||atname.last ||  '   '||atname( atname.last-1));
    bprocessed := TRUE;
    END IF;
    IF NOT bprocessed
    THEN
    nindex := nindex + 1;
    atname.EXTEND;
    atname (nindex) := vtname;
    PIPE ROW (vlevel || ' => ' || vtname);
    DBMS_OUTPUT.put_line ( ' **** nindex - atname( nindex) '
    || nindex
    || ' - '
    || atname (nindex)
    DLOG('ADDING ',vTname); A LOGGING ATONOMUS PROCEDURE FOR DEBUG PURPOSE
    END IF;
    EXIT WHEN c1%NOTFOUND;
    END LOOP;
    CLOSE c1;
    FOR i IN 1 .. atname.COUNT
    LOOP
    DBMS_OUTPUT.PUT_LINE('atname (i) ' ||atname (i));
    END LOOP;
    RETURN;
    EXCEPTION
    WHEN no_data_needed
    THEN -- THIS EXCEPTION HAS TO BE THERE TO GET THE FUCTION WORKABLE
    DBMS_OUTPUT.put_line (SQLERRM);
    RETURN;
    --SELECT * FROM TABLE( get_child_tables('TB_XOP_LETR_TEMPLATE','OPS$CMS',5));
    END get_child_tables;
    Edited by: user3066657 on Jul 21, 2011 8:42 AM
    Edited by: user3066657 on Jul 21, 2011 11:26 AM

  • Track changes on 'Z' tables

    Hi,
    We have a requirement that to track changes on our Z tables. Could any one help me in process of doing this ?
    Thank you,
    Surya

    HI,
      U Read follow this for clarifies u r doubt..........
    As with business objects, we recommend that you activate the logging of changes to table data for those tables that are critical or susceptible to audits. (See the SAP – Audit Guidelines R/3 FI, in Section 4.3.5, for examples of important tables. This document is available at
    http://www.sap.com/germany/aboutSAP/revis/infomaterial.asp. You must also explicitly activate this logging. Note the following: 
    ·        You must start the SAP System with the rec/client profile parameter set. This parameter specifies whether the SAP System logs changes to table data in all clients or only in specific clients. We recommend setting this parameter to log all clients in your productive system.
    ·        In the technical settings (use transaction SE13), set the Log data changes flag for those tables that you want to have logged.
    If both of these conditions are met, the database logs table changes in the table DBTABPRT. (Setting the Log data changes  flag only does not suffice in recording table changes; you must also set the rec/clientparameter.)
    You can view these logs using the transaction SCU3.
    Although we do deliver pre-defined settings, you generally have to modify them to meet your own requirements. Use the report RSTBHIST to obtain a list of those tables that are currently set to be logged. Use transaction SE13 to change the Log data changes flag for these or other tables.
    For more information, also see SAP Notes 1916 and 112388.
    regards,
    sudheer.

  • Apply the change to the table

    I want to set up a stream to capture, propagate and apply the changes on the table TB in DB1 to the table TB in DB2. Both tables are the same name and structure.
    If the value on column1 of DB1.TB is y, issuing the UPDATE statement
    update DB1.TB set column1 = x
    will replace y with x.
    However, at destination DB2.TB, column1 has the value
    z = sum(column1) of DB1.TB,
    the chnage at source table (x-y) will need to be added onto the column at DB2.TB, making it z+(x-y).
    Any idea on how to use the rule or handler to realize this transformation?
    My understanding is that we shouldn't query the DB2.TB in the rule / handler function. Correct me if I am wrong.
    Thanks for any help.
    Eugene

    Hi Eugene,
    I haven't seen a requirement/best practice that you shouldn't query the target table in the dml-handler. And in the contrary of table-triggers there's no 'mutating table problem' in here, because of the source of the event. I can't see any functional problems in querying the target table. You should even be able to query the source database over a database link. If any streams-guru has an other meaning I'm interested in hearing it. The only thing you should bother about is the performance in this. Since the dml-handler is a peace of code executed by the apply process it slows down the applying of the event. If you implement 'heavy' functionality by doing all kinds of queries then it's like driving with your foot on the brake. If your source table is suffering from lot's of mutations then your capture process might not be able to post its events to the apply process, causing spilling of events.
    In that case it's better to let your apply process enqueue its events on a seperate queue (there is an method for in I thought the dbms_apply_adm package or the dbms_streams_adm to add a seperate queue to the apply process). Then the LCR changes into a Custom-enqueued-event that can be dequeued from a custom-process. Then you can create a seperate dequeue-process that you can schedule with in dbms_job/dbms_schedule that does the applying of the changes.
    Regards,
    Martien

Maybe you are looking for