Will an IMPORT fire database triggers?
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Will an IMPORT fire database triggers?

  1. #1
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818
    Will importing rows into a table fire the triggers on the target table?

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by JMac
    Will importing rows into a table fire the triggers on the target table?
    If it is enabled, yes.


  3. #3
    Join Date
    Oct 2001
    Location
    Madrid, Spain
    Posts
    763
    Hi,

    It depends, I explain:

    If your table and trigger are created, yes the import fire up your triggers.

    If you drop the table and is the import file who create the table, no because the trigger always are created after the row's import.

    Best regards

    Angel

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    In the back of my mind, I am thinking that DIRECT=y imports don't fire triggers, but I can't back it up with a link...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  5. #5
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818

    Thanks Guys

    Think I need to disable all triggers and constraints - do the IMPORT (I know the data is pukka as it was created in a DB with these constraints and triggers) - then enable all the triggers and constraints.

    If anyone can tell me the best IMPORT/EXPORT syntax to use in future I'd be grateful.

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    mariest there is no direct in imp!

  7. #7
    Join Date
    Oct 2000
    Posts
    467
    Originally posted by pando
    mariest there is no direct in imp!
    yep. only direct export.
    Vinit

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    OK, I really meant to say: When importing a export file that was exported with DIRECT=Y, I don't think that triggers are fired...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  9. #9
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    Well direct only works in export, import will always do insert anyway not writing directly to data block

  10. #10
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    hmm, maybe was sql*loader direct=y. maybe I was just dreaming...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

Posting Permissions

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



Click Here to Expand Forum to Full Width