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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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
    770 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following