Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Question Unanswered: trigger on activation database

    I need a trigger when activation database occurs, or when HADR changes the active server.
    Is it possible?

    thanks

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I can't think of a direct way to do that...

    what do you want the trigger to do ?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You are aware that DB2 deactivates a database when the last connection goes away and activates it again upon the first connection - unless you have explicitly activated the database. So triggering on database activation may occur at more or less random points in time.

    I'm also interested in understand what kind of action you want to perform based on this event.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  4. #4
    Join Date
    Jul 2009
    Posts
    2
    Hi,
    I've develop an external task manager that is outside DB2 process. This task manager is feed via IPC shared memory when triggres on TASKS table occurs.
    The problem is that i need a wake-up process to the first time.
    I don´t want to use JDBC drivers, because the daemon must be too light.
    In my design, DB2 role must be the client, and my task manager the server.

    Sorry for my english, my programs are better ;-)

    Adolfo

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Since you have a trigger on the TASKS table anyway, why not attempting the wake-up in that trigger already? If the process is already running, the wake-up has nothing to do.

    If you actually try to implement a scheduler that executes some tasks - independent of DB2, have a look at existing solutions. You could also regularly poll whether DB2 is running.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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