If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > trigger on activation database

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-09, 15:08
alopecia alopecia is offline
Registered User
 
Join Date: Jul 2009
Posts: 2
Question trigger on activation database

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

thanks
Reply With Quote
  #2 (permalink)  
Old 07-02-09, 17:03
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,332
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.
Reply With Quote
  #3 (permalink)  
Old 07-03-09, 03:35
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,568
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
Reply With Quote
  #4 (permalink)  
Old 07-03-09, 09:11
alopecia alopecia is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 07-03-09, 18:56
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,568
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On