ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RSTOBJ *FILE Table with INSERT Trigger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RSTOBJ *FILE Table with INSERT Trigger

    When you restore a PF that already exists into same library from which it was saved, does the INSERT trigger fire? Thanks.

    Chris

  • #2
    yes it does fire off on each record. When we restore to our dev box we make sure the triggers are all disabled using ops nav.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Everything that adds/updates/deletes a record will fire a trigger. (Yes, that includes RSTOBJ.)

      In addition to ops nav, you can also disable the trigger from green-screen (or a CL program if you want to automate the process) with the CHGPFTRG command.

      Comment


      • #4
        Hi Scott,

        I didn't think that was true for CLRPFM, that a delete trigger would not be fired.

        I know about disabling triggers. We may need to restore a table with 2.5 million rows that has an INSERT trigger attached. Thanks!

        Ringer

        Comment


        • #5
          The trigger will not fire when the file is restored with no existing target file. So another option is to simply delete the file before restoring it.

          Cheers,

          Emmanuel

          Comment

          Working...
          X