Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Location
    Centurion, South Africa
    Posts
    20

    Unanswered: Triggers Inoperative After Reorg

    Hello

    Recently I got an issue that the triggers have to be recreated in case a column attribute say NOT NULL is dropped from the Parent table.

    PARENT TABLE -> Drop not null -> Reorg

    Now after reorg when I try inserting the data a exception related to trigger comes in. Even if I drop the not null from Audit table in which the trigger inserts data and reorg it I still get the exception.

    The solution that I used is to recreate the trigger.

    Can anybody suggest how the recreation of trigger can be avoided.

    Thanks & Regards
    Satyajit

  2. #2
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    After you ALTER TABLE (for any reason), be sure to check syscat.triggers for any rows with VALID <> 'Y' , because if any such rows exist then you need to recreate those triggers. I suspect your symptom has nothing to do with reorg, but instead results from the alter. You can also use the syscat.invalidobjects view (better to use it or equivalent) because Alter Table can invalidate objects other than triggers...there's also ADMIN_REVALIDATE_DB_OBJECTS to help.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •