Results 1 to 6 of 6
  1. #1
    Join Date
    May 2003
    Location
    Bedfordshire, UK
    Posts
    4

    Lightbulb Unanswered: Triggers Firing During Database Loads?

    Hi,

    I came across this in Sybooks and was bemused:

    Loading a database from a previous dump causes any triggers defined in the database to fire, which can increase the amount of time required to load the database. Use the disable trigger option of the alter table command to disable any triggers in a database before you load the database. Use the enable triggers clause to re-enable the triggers after the load database is complete.

    Any ideas why Triggers are fired? I thought the database loads blatted all the data pages anyhow.

    Cheers,

    Andy

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Hiya awilkin,

    That ain't true(technically). Perhaps a doc bug, where in sybooks did you find this?

    Cheers
    Willy

  3. #3
    Join Date
    May 2003
    Location
    Bedfordshire, UK
    Posts
    4
    Willy,

    I hope you're right. This information is in the "Whats new in Adaptive Server Enterprise" for ASE 12.5 -> Chapter 3 -> disabling triggers.

    Sorry can't paste the link, but it if you search the online sybooks for:

    "causes any triggers"

    And you'll find it.

    Cheers,

    Andy

  4. #4
    Join Date
    Sep 2002
    Location
    Hong Kong
    Posts
    159
    Never seen this happen

  5. #5
    Join Date
    May 2003
    Location
    Bedfordshire, UK
    Posts
    4
    The question is how would you tell if the triggers have fired? After all, you blat the data. If its wrong it seems a bit odd that Sybase now trumpet the feature (useful though it is for BCPs etc).

    Andy

  6. #6
    Join Date
    May 2003
    Location
    Bedfordshire, UK
    Posts
    4
    All,

    Have tested this by creatying two databases, with a trigger causing an insert into the second database.

    Unless the trigger is rolled back, the documentation is incorrect.

    Andy

Posting Permissions

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