Track table data changes (inserts, updates, deletes) including os_user

Hi ,
I was given a task by manager to keep track of changes on a given table including os_user who made it.
Should I create a trigger on it (on any update, insert, delete etc.) or there is a better way of doing it ?
I think there could be some info already in some data dictionary views or something like it.
If I CREATE MATERIALIZED VIEW LOG on that table would it help?
I'm kind of new to that sort of tasks,
Thanks a lot!

Leo_Y wrote:
Hi ,
I was given a task by manager to keep track of changes on a given table including os_user who made it.
Should I create a trigger on it (on any update, insert, delete etc.) or there is a better way of doing it ?
I think there could be some info already in some data dictionary views or something like it.
If I CREATE MATERIALIZED VIEW LOG on that table would it help?
I'm kind of new to that sort of tasks,
Thanks a lot!is application 3-tier like below?
EndUser<=>browser<=>WebServer<=>ApplicationServer<=>DatabaseServer

Similar Messages

  • How do we track how many records INSERT/UPDATE/DELETE per day

    Hi All,
    We have around 150 tables in database. so many members/persons can access these table and every one can have rights to do INSERT,DELETE,UPDATE the records. I wanted to know How many records are UPDATED,INSERTED,DELETED for a day. is it possible to find out.
    I have some questions please clarify the doubts.
    1> If we create any table, this table gets store in All_OBJECTS/USER_OBJECTS, tabs/tab/user_tables...... we can find out table name,columns what tables were created in database.
    2> if we enter records/ delete records / update records in a table. we can able to find corresponding table. Apart from corresponding table . is there any way to find out records.
    above i said that if i create any table it will store in objects table.

    Schedule a periodic DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO and query USER_TAB_MODIFICATIONS. This view shows DML activity against each table and is updated when database monitoring info is flushed. The flush is automatic but if you need control over the frequency of updates, you can explicitly call the FLUSH.
    In 9i you have to "ALTER TABLE table_name MONITORING ;" before you can use this method.
    In 10g, this is enabled by default unless STATISTICS_LEVEL is set to BASIC.
    See http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4465.htm#sthref2375
    and
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#ADMIN01508
    Another useful view is V$SEGMENT_STATISTICS (or the faster view V$SEGSTAT) which provides information in the same manner as in the V$SYSTAT / V$SESSTAT views.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • How to find out who made inserts/updates/deletes made to a SQL Table

    I want to know WHO MAKES INSERTS/UPDATES/DELETES TO a particular SQL Table. Bascially I want to AUDIT ANY Edites made to a SQL 2008 TABLE. I need info such as WHO AMDE THE Updates i.e. the user first/lastname, When update was made, what row was updated etc...How
    can I do that with SQL 2008?

    One way to achieve that would be to use triggers to detect when a change is made to the table, and then insert a record into another table/database detailing what changed and who by.
    You'd need three triggers, one for insert, update and delete respectively, and for each of those you use the "inserted" and "deleted" tables (system tables maintained by SQL) to retrieve what has been done. To retrieve who made the change you can query IDENT_CURRENT
    which returns the last identity value for a specific table.
    See :
    Triggers -
    http://msdn.microsoft.com/en-gb/library/ms189799(v=sql.100).aspx
    Inserted & deleted tables -
    http://technet.microsoft.com/en-us/library/ms191300(v=sql.100).aspx
    INDENT_CURRENT -
    http://technet.microsoft.com/en-us/library/ms175098(v=sql.100).aspx
    There may be better / more up to date ways to do this, but I've used this method successfully in the past, albeit a long time ago (on a SQL 2000 box I think!).

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • Using Case statement to insert,update,delete  the tables

    Hi All,
    I have to check the databse ,
    if it is developement then
    insert/update/delete values in tables;
    if it staging then
    insert/update/delete values in tables;
    if it is production then
    insert/update/delete values in tables;
    thers is function available to check the current database
    For doing the about i am trying to write CASE statement like this
    SELECT function,
    case
    when fun = 'developement' then insert into table1 values ('abcd','1234')
    when fun = 'staging' then insert into table1 values ('abcd','1234')
    when fun= 'production' then insert into table1 values ('abcd','1234')
    else null
    from dual
    its throughing me an error
    please help
    Thanks,

    Hi,
    You can use CASE staement any place where an expression is expected.
    For example, in:
    UPDATE  table_a
    SET     col1 = exp1
    ,       col2 = exp2
    WHERE   exp3 = exp4;all the expressions are labled lke expn.
    Note that table_a, col1 and col2 are not expressions: you must hard-code these names, or use dynamic SQL.
    So it's okay to say:
    UPDATE  table_a
    SET     col1 = CASE
                       WHEN  db = 'development'  THEN  0
                       WHEN  db = 'staging'      THEN  1
                   END
    ,       col2 = CASE
                       WHEN  db = 'development'  THEN  NULL
                       WHEN  db = 'staging'      THEN  col2
                   END
    WHERE   db != 'production';In this example:
    in the development database, col1 is set to 0 and col2 is set to NULL
    in the staging database, col1 is set to 1 and col2 is unchanged (that is, set to what it already was)
    in the production database, nothing is changed (the WHERE condition is always FALSE)

  • Insert/Update/Delete in forms6i using Objects table in Oracle9i server

    I am using Oracle 9i server and dev 6i (forms6i).
    i have a form based on Object tables (including REF's items). when i try to insert update, delete the reocrd in the form, it gives error.
    Insert/Update/Delete failed because of OCI_22132: hexadecimal string does not corresopond to a valid REF.
    when i remove REFs items from form (not from database) then it does all functions (insert,update,delete,query).
    Actually i haved used this form with Oracle 8i and it did all functions(insert,update,delete,query). i am using the same tables and types definations in Oracle 9i but it is not working.
    Note: Insert, Update, Delete, or Query is not being done through forms when using REFs items. Others tools like sql*plus are performing the same actions very well.
    Please help.
    I will be thankful to you.
    M. Faisal.

    user563114,
    As James (padders) told you in his reply to a similar question that you posted (Typed tables is treated in the same way as a relational table?) in the Typed tables is treated in the same way as a relational table? forum, the only way you can tell for sure is to try it out both ways, measure and compare the times.
    Of-course, there are many factors that effect the time, apart from whether you use a nested table or a regular table.
    Good Luck,
    Avi.

  • How to get last insert/update/delet row of a table?

    I hava a table A and table B which is a copy of A. I want to create a trigger to record the changes of A in B. So every time inserting/updating/deleting A I record the row inserted/updated/deleted in B, But I can't find a effiencial way to get the latest row changed.
    So is there any sys_var in oracle table like cur_rowid or something to record the latest inserted/updated/deleted in a table? I don't want to check a index or a table to get the max_seq_id again.

    user11228816 wrote:
    I hava a table A and table B which is a copy of A. I want to create a trigger to record the changes of A in B. So every time inserting/updating/deleting A I record the row inserted/updated/deleted in B, But I can't find a effiencial way to get the latest row changed.
    So is there any sys_var in oracle table like cur_rowid or something to record the latest inserted/updated/deleted in a table? I don't want to check a index or a table to get the max_seq_id again.Sounds like an ugly requirement, any reason you're not going for materialized views or advanced replication here?

  • Tracking Table value changes

    Hi all,
    currently we are in the process of tracking the data changes in the following table
    /sapsll/adrcon (GTS specific) but it has been checked for the log data changes in its technical settings
    but still we are unable to track the changes in
    cdpos table
    please provide your valuable inputs
    so that we can track the changes
    cheers
    balu

    Hi,
    The place where we find Transaction Table history is SCU3.
    ===================================================================================================
    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).
    Regards,
    Bhargava

  • How to display the result of  excutions(insert/update/delete rows)

    Hello.
    Does anyone know how to display the result of scenario executions just like a scenario executions tab of package (insert/update/delete rows) in other screen (in the intergated operating platform for operators using http)
    In additional, I also like to show the hierarchy of scenario in the same view.
    So, I need the query using the information of the ODI repository.
    If it is possible, I also like to have the decription of the tables in the ODI repository.
    Can anyone tell me how can I get the information of the counts of excution?
    Thanks in advance.

    Hi,
    You can get that information from the API getPrevStepLog. Does it work for you?
    Download the last API reference manual from:
    http://www.oracle.com/technology/products/oracle-data-integrator/10.1.3/htdocs/1013_support.html#docs

  • How can perform insert /update /delete in one single mapping.

    Hi,
    I want to is there any logic by which we can create 2-3 pipeline in a mappings like pipelines will work for insert / update /delete or storing soem rejected data according to conditional flag.
    I tried it in a mapping but problem is that when target load order is like ins then upd then delete/reject . if new rec will come then control will pass through ins target . but if rec needs to update or delete then again control is going to ins target not update / delete target.
    We have already given the all conditional flags in filter after lookup and before target .
    all possibilities we checked but didnt got success.
    last option is separate the mappings for insert / update/delete.....etc.
    Is there any solution for this type of problem.
    reply plz if any body have solutions.
    ---Umesh

    Hi Umesh,
    I understand from your query that you want to load target with insert, update and delete rows after runnng the mappping...
    If you are looking for the same then you can use one of the Oracle fetures Oracle Streams: Change Data Capture.
    the Url is:
    http://www.oracle.com/technology/products/bi/db/10g/pdf/twp_cdc_cookbook_0206.pdf
    If any other help required do reply.
    Regards
    Tarang Jain

  • How to Invoke a BPEL process when Insert/Update/Delete happens

    Hi
    As client requirement is we want to execute a BPEL process when there is a DML Operation (Insert/Update/Delete) on a particular table.
    How do we handle this situation. Is there any alternatives if it is not possible.
    Please point me if any documentaion is available.
    Regards
    Kiran

    Hi Kiran,
    What integration tool you are using.
    In Oracle BPEL PM, you can create an empty BPEL process with a "receive" activity and a database adapter partnerlink which polls for change in table records every specified time interval.
    After receiving the table change, you can fire the appropriate BPEL process through "invoke" activity.
    thanks
    Saurabh

  • Scenario: Insert update delete into a 3 billion target from a 2 billion source

    Both target(3 billion rows) and source (2 billion rows) are SQL server tables partitioned by "Year-month". Now I want Insert update delete from source to target. This is just a scenario that I was thinking about. I was thinking about the best approach
    for the load.
    With my little knowledge I would write a stored procedure with Merge statement but given the large amount of data will that be the best solution? 
    Please advise. Thanks in advance for your help.
    svk

    You need to find out how much data from what dates you need to operate on.
    Is it a data sync endeavor?
    A few tips: forget about the Lookup, too slow, and the Cache Transform will be a burden.
    I would go with the T-SQL MERGE, but may want to do it in chunks, e.g. limit to date ranges.
    Arthur My Blog

  • Table for table data changes log

    Hello,
    The data in the table T016 was updated with new records.
    I want to know the log for the table data changes. In the table's technical settings the check box "Log data changes" was checked and Delivery Class is 'C'.
    I tried with SCU3 transaction, but it is saying no log for the table.
    And also i checked the tables DBTABLOG,DBTABPRT. But there are no records available.
    Regards,
    Ravi.

    Look at this link below
    http://www.mariewagener.de/Note.September.2007
    usually system parameter rec/client should be enabled to store table changes - this is the reason you can't see table changes in dbtablog table.

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Insert , Update & Delete Not working in BDB Berkley Database

    Hi,
    Anybody has used Oracle ADF & BDB ,to insert/ update & delete?
    imported db.jar,dbexample.jar,sqlite.jar ,derby.jar. still not working (Only Query working)
    Pls lets us know

    Hi,
    Do you have a small test case program that demonstrates this? A JDeveloper project showing what exactly is the problem when trying to use the BDB SQL JDBC driver to insert data into the BDB SQL database? What do you mean by "not working", do you get any errors, you do not get errors but you do not see the data in the database etc?
    What are the versions of Java, JDeveloper, ADF and BDB SQL you are using, and on what OS?
    Regards,
    Andrei

Maybe you are looking for

  • How to restore ipad using last backup in icloud

    how to restore ipad using last backup in icloud

  • Planning Book...

    Hi friends, I have a requirement in which i need to read data from the planning Book in Advanced Planning and Optimization System. Can anyone provide me the "Bapi for reading data of planning book". Useful replies will be rewarded. Thanx, Rahul.

  • Running adobe acrobat xi pro for 1st time stuck on sign-in

    I have successfully installed Adobe Acrobat XI Pro on windows 7 and created an Adobe User ID. When I try to run the program, when asked to enter log-in details, I enter these and then the program appears to load but gets stuck on the sign-in page.

  • Keep signing in and massive lag

    hello my skype was working fine suddenly having 2 unknowned issue. When I opened my skype having massive lag until i closed the lag will gone. While i was laging also tried to sign in my account and take forever keep "signing". My desktop window run

  • Running JPDA on several VMs

    i read that you could connect to several VM's running JPDA at the same time. I think this is rather a dumb question, but I just want to confirm, as I'm a newbie to the JPDA . . . I guess each VM would have to ahve it's own port number for the server