How to monitor the update the user trigger sql table column

Hello

My database in the face of a problem that someone (or some jobs) always update the decimal points in a column. I want to trace who (what) update of the column, but the database do not have verification of activation.

can anyone help. provide a trigger script to monitor the table if the column has been updated by commas, which returns records in a table.

Thank you very much.

Concerning

Sean

Why not, it's also so easy...! ! !

SQL> CREATE TABLE audit_log (
  2  old_id VARCHAR2(15),
  3  new_id VARCHAR2(15),
  4  chng_by VARCHAR2(10),
  5  chng_when DATE,
  6  machine VARCHAR2(20),
  7  osuser VARCHAR2(20));

Table created.

SQL> CREATE OR REPLACE TRIGGER referencing_clause
  2  AFTER UPDATE
  3  ON report_heading
  4  REFERENCING NEW AS NEW OLD AS OLD
  5  FOR EACH ROW
  6  BEGIN
  7  IF INSTR(:NEW.ID,',') > 0
  8  THEN
  9  INSERT INTO audit_log
 10  (old_id, new_id, chng_by, chng_when, machine, osuser, ipadd)
 11  VALUES
 12  (:OLD.ID, :NEW.ID, USER, SYSDATE, SYS_CONTEXT('USERENV','HOST'), SYS_CONTEXT('USERENV','OS_USER'));
 13  END IF;
 14  END referencing_clause;
 15  /

Trigger created.

SQL> ALTER TABLE REPORT_HEADING ENABLE ALL TRIGGERS;

Table altered.

SQL> SELECT * FROM REPORT_HEADING;

ID
--------------------
104001.1
104002.1
104002.1
99.00
246004.1
88.00,

6 rows selected.

SQL> UPDATE REPORT_HEADING SET ID='99.11,' WHERE ID='99.00';

1 row updated.

SQL> SET LINE 200;
SQL> select * from audit_log;

OLD_ID          NEW_ID          CHNG_BY    CHNG_WHEN MACHINE              OSUSER
--------------- --------------- ---------- --------- -------------------- -------------------- ---------------
99.00           99.11,          SCOTT      05-MAR-10 BOSER\GIRISH         GIRISH\Girish Sharma

BOSER here is my workgroup name and GIRISH is my machine name.

HTH
Girish Sharma

Tags: Database

Similar Questions

  • How to get the use of database tables/columns in the table of edge/analysis?


    Hi all

    Anyone has an idea on how to get the tables in DB/colomns usaged in edge/analysis table in OBIEE 11 G?

    Thanks in advance!

    Anne

    You can try to generate a report of Catalog Manager for analysis / SA want to create the line and your RPD you can go to utilities > documentation of the repository and get the domain you want to and get all the mappings in Excel format.

    I hope this helps.

    SVS

  • How to monitor the activities of internet users without using third-party software. We have some 60 windows domain user

    Hi all

    We have 60 knots which is connected with the windows domain. How to monitor the activities of internet users via the windows server

    without third-party software.

    Thanks in advance

    Alam

    Hello

    The business support, you can find forums on TechNet, please create a new post at the following link:

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • How to monitor the use of the Hyperion applications

    Hi all
    We have developed a classical Planning Application in Hyperion 11.1.2
    The application is running in production mode, and now we want to monitor the use of this application, in this regard, I have following questions:
    (1) how to activate the newspapers?
    (2) how to monitor the time of connection and disconnection of each user
    (3) how to check the amount of data entered in a particular week
    (4) how to check that data are entered against how much the faculty members?

    I won't pretend to know what should I know about this subject, but I get this question of a large number of customers. So, here is my answer. There is no right way to monitor who logs and how many times they connect. If you enable the audit DATA, that you can do is to see when a user loads the data and how often they do. This does not match the connection, but planners usually don't connect to display data (which are normally made in EN or SmartView), they connect to load/update of data. With active audit DATA, you can query the HSP_AUDIT_RECORDS table, which is where the audit is stored, and see how many times the user load the data and the last load of data. Is not correct, but it is far more closely than any other method I've found.

    Example of the last connection (really last loaded data)
    SELECT USER_NAME AS 'User', time_posted as 'Last Login Time' OF HSP_AUDIT_RECORDS WHERE TYPE = "data";

    You can use a similar query to count the number of data loads.

    This would also show you what the user has launched it to business rules.

    Another option would be to enable SSAUDIT on the planning application in Essbase (this is done in the Essbase - google SSAUDIT server configuration file). This will create 2 files. The first is a file index or pointer. There will be a line for each record, via a web form or SmarView load. The second file contains all of the loaded data. The first file will tell you that loaded which lines in the second file and what time he did. The downside is that each connection between planning and Essbase uses the ID of the source of data for planning. So, it always shows the same loading data ID and will not be the real of the user who did it.

    Note that users do not have to connect through planning. They can directly connect to Essbase. All financial reports that would be misunderstood by looking only at the planning.

    If you really want the actual load, you really watch the Essbase and Essbase application log files. Would not show you users, but could show you the number of queries, the data loads, etc. You could analyze these logs in a relational table for quick access to the use of the query.

    That's a lot of things to take. Unfortunately, to answer your question, it is not a quick option, "click here."

    Utility to analyze the logs can be found at http://code.google.com/p/jrightlog.

    ------------
    Kyle Goodfriend
    http://www.in2hyperion.com

    Please be sure to assign the post as answered and answers as response or useful if others can benefit from your experience.

  • How to monitor the TX and RX on PERFORMANCE for virtual network adapter BASP monitor?

    How to monitor the TX and RX on PERFORMANCE for virtual network adapter BASP monitor?

    I have a virtual network adapter that is created with Broadcom.

    This virtual interface named "BASP eCard" visible on the performance monitor in the category 'Rhythm Pipe' but not in the category "Network Interface".

    This is problematic because the Tx and Rx (bytes received/send in second) is available in "Network Interface" that show physical network cards only.

    Someone has an idea?

    Thank you

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • Somehow, I blocked my user account (login) and I tried to help but can't find any info. How to UNLOCK the user account. Than k you

    The user has clicked on Vista, the little lock at the bottom of the START window.

    Somehow, I blocked my user account (login) and I tried to help but can't find any info. How to UNLOCK the user account. Thank you

    Hello

    Click the account icon that was locked and enter the password IF you know and otherwise:

    Try Safe Mode - several times, press F8 that you start. The Admin account there is no default password
    so unless someone has changed, you should have access there. Then Control Panel - accounts - users
    Manage another account - use this down your user account (to the lowest level) APPLY/OK
    then go back and reset it to the Admin APPLY/OK - this clearly allows corruption. Do this several times.
    Then fix the password in your usual account. Do not forget to leave your account administrator if you
    wish.

    If no joy Mode without failure:

    Try this - use the hidden administrator account to lower your user account (to the lowest level) APPLY/OK
    then go back and reset it to the Admin APPLY/OK - this clearly allows corruption. Do this several times.
    Then fix the password in your usual account. Do not forget to leave your account administrator if you
    wish.

    Make another Admin account with your password and use it to fix the others if necessary. (just for
    repair, don't use regular account, not a safety valve) always keep a spare ADMIN account.

    DO NOT LEAVE THE ENABLED LSA OR USE DAILY. If it corrupts you are toast!

    How to enable or disable the real built-in Administrator account in Vista
    http://www.Vistax64.com/tutorials/67567-administrator-account.html

    You can run the Admin account hidden from the prompt by if necessary.

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    If you cannot access your old account, you can still use an Admin to migrate to another (do not forget to always
    not that an Admin account that is not used except for testing and difficulty).

    Difficulty of a corrupted user profile
    http://windowshelp.Microsoft.com/Windows/en-AU/help/769495bf-035C-4764-A538-c9b05c22001e1033.mspx

    ---------------------------------------------------------

    If necessary:

    Ophcrack is a free Windows password cracker based on rainbow tables.
    http://Ophcrack.sourceforge.NET/

    How to reset a Windows Vista - Trinity Rescue Kit method - password password reset disc - burn the ISO
    http://www.WikiHow.com/reset-a-Windows-Vista-password
    YouTube video on the use of the Trinity rescue Kit
    http://www.YouTube.com/results?search_query=Trinity+rescue+Kit&search_type=&AQ=f

    Reset your forgotten password the easy way using the Ultimate Boot CD for Windows
    http://www.howtogeek.com/HOWTO/Windows-Vista/reset-your-forgotten-password-the-easy-way-using-the-ultimate-boot-CD-for-Windows/

    Offline NT Password & Reset Editor
    http://home.eunet.no/~pnordahl/ntpasswd/

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • How to help the user focus

    How to help the user focus

    Magnifier enlarges part of the screen. This is especially useful for viewing objects that are difficult to see. It is also useful for people who are generally difficult to see the screen.

  • How to fix the user accounts in windows 8

    How to correct the user account in windows 8 on new g7 2246nr, I put to your laptop using the Microsoft account then switched to a local account.  I found myself with i admin working the rest of my files are broken up between 3 other user accounts.  I spoke with Microsoft to try to consolidate the accounts and they used a command line in the command, but he has not done. I always work with the system, but it has problems. I reloaded the software so for 3 times. All know how to correct the problem without reload all the software again?  also, after configuring sharepoint in Office Pro Plus, he created another administrator account.  I do not think this would happen?

    Hi BJ2124,

    Although I regret the inconvenience that you had with your experience of Microsoft Windows 8, you can better receive the technical expertise you need by contacting Microsoft about the issue of multiple account creation.

    You can call Microsoft Customer Service at 1-800-642-7676
    Mon - Fri: 05:00 - 21:00; Sat - Sun: 06:00-15:00 (PST)

    As a reference, I included the link to the technical support of Microsoft Windows 8 page:

    http://support.Microsoft.com/contactus/?ws=support

    Also, here is a reference link to change logins to Microsoft for local accounts:

    Microsoft how to switch from one account to a Local account in Windows 8

    And finally, here is a quick reference to solve the problem that you encounter while using an account download troubleshooting tool from Microsoft:

    The problems of account Microsoft Windows 8 with convenience store "Microsoft accounts"

    In this forum support is available for support hardware/software HP. I will provide better supported with your hardware/software of HP. If you need help with a software which is another provider, so I can re - direct you to reference appropriate at this time.

    I hope that you can mark these messages as solved, so that you can inspire others to follow your example with success. You never know who you can inspire.

    -How can I give Kudos? | How to mark a post as solved? --------------------------------------------------------

  • How to know the user is the call

    Hi all

    I development push a service Application in which the following requirement is that the push message should not be displayed when the user is in the call. How to detect the user wheather so busy on appeal?

    Please suggest me how to proceed.

    looking forward to responses CIHI to you guys.

    Thank you

    I thought you wanted to know if the user is on a call.  The code I gave you the will and sets the appropriate Boolean value.  Where and how you use it is up to you isn't it?

    I would have thought that the logic in your code to push would be simply

    If (! onCall) {}

    view

    }

  • How to create the user account using the command?

    How to create the user account using the command?

    Open cmd as administrator, and then type the following commands one after the other

    NET user / add program mypassword
    net localgroup administrators program / add
    net share concfg * C:------/ grant: program, complete
    This will create a user account with the name "Program" and the password "MonMotpasse".

    You can create the user name and password of your choice.
  • How to disable the user rights in adobe acrobat reader DC?

    How to disable the user rights in adobe acrobat reader DC?

    Is not possible. You need Acrobat for that.

  • How to prevent the user open and play a flash game on multiple browser windows at the same time?

    Hi guys,.

    I made a game as the same site: http://www.Netent.com/games/table-games/Texas-Holdem-Pro-series/

    Anyone know how to prevent the user opened and play the game on multiple windows browser both?

    I used the command of flash to embed flash into a page aspx and connection to sql server

    Someone help me, please.

    p/s: Sorry, my English is not good

    You can use localconnection.

  • How to pass the user/pass of OSB to a secure service

    How to pass the user/pass of OSB to a secure service

    http://download.Oracle.com/docs/CD/E13159_01/OSB/docs10gr3/consolehelp/serviceAccounts.html

  • How to display the user name in report editor RTF BI?

    Please advice how to display the user name in report editor RTF BI?
    Maybe this can be done via a hidden parameter of the report, BEEP, which by default will be implemented with the macro as {$username$} (or smth like)?
    Thanks in advance!

    Yes, or create a hidden report BEEP setting with the name you want and the default ": xdo_user_name" (without ""). And on the report that you call the parameter with the username!

  • How to give the user ONLY views all SYS?

    My DBA cannot give me all s/n priveligies, but does not know how to give me ONLY priveligies all SYS views (v$ sql, v$ sqltext, process$ v, dba_scheduler_jobs,...)

    How to give the user to display all VIEWS SYS?

    in my case should be 1)? Right?

    The privilege or role will provide the desired access.

Maybe you are looking for

  • I can't get the SpeedBit Video Download toolbar to load the home page

    I down loaded the SpeedBit Video Downloader today and tried to add in the toolbar, as described - by right click andcustomization of 'Add new toolbar', but the toolbar does not appear. Help, please

  • How to transfer files from old PC of office to the new Satellite L750?

    Hi everyone - starting at this site so be gentle with me please. Specifically, I want to ask: (a) Will the MS Word 7 Starter, which is already installed on my computer Toshiba laptop accept a lot of files from my old Desk Top for most Word documents?

  • How to determine the Thread of execution for PostUIMessage,

    Greetings: I'm trying to develop an application TestStand with two Interfaces (in addition to the sequence editor) user, and I need to be able to view messages from interface user back and forth between two user interfaces. So far I managed to create

  • Loss of data when you save it to a file?

    Hello I have problems with my data recording. I acquire at 2.5 MHz for 5 seconds and when I view it I don't see 1.2 s data, if you use a single channel, or unless, as 0.4 s data, when getting the 8 channels. My vi is attached and also a picture of hi

  • Windows Movie Maker crashes when publishing in any form.

    I was using Windows Movie Maker to make a photo slideshow. I tried to post it on my computer, but it will crash. With active DEP, Windows prompted me that DEP has closed the program. When I disabled DEP, it does not work too. I use Windows Movie Make