Trigger for DB2 user administration

5 pts.
Tags:
DB2 administration
Hi guys, I want to create trigger to avoid users updating records or when he update that data want to write one log file with his Login ID, time, date etc. Please help me. If these is possible using trigger then please tell me how? Thanks Amar

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here’s how to add a trigger.

If you dig further into this publication it gives you example of building trigger programs.

Good luck.

Kev

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Technochic
    Can you help us provide an answer by providing us with more details please? What application or database is it you are asking about please? What version and patch level? Thanks!
    57,010 pointsBadges:
    report
  • AshishSingh10
    Hi, You can create trigger by following the below mentioned code: -

    CREATE TRIGGER TESTUSER.TEST_TRIGGER
    -- [NO CASCADE] BEFORE, AFTER, INSTEAD OF
    -- INSERT, DELETE, UPDATE [OF ]
    ON -- table_name
    -- REFERENCING OLD AS OLDROW NEW AS NEWROW
    FOR EACH -- ROW OR STATEMENT
    -- can insert action here
    -- WHEN (search_condition)
    -- can insert sql procedural statement here
    Thanks and regards
    Ashish@S
    1,330 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: