This is a discussion on daemon for db2 within the DB2 forums, part of the Database Server Software category; --> hey everyone. im looking for some sort of daemon or other type o program that can run on/with db2 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hey everyone. im looking for some sort of daemon or other type o program that can run on/with db2 that will periodically wake up an query a table, and depending on what it sees, it may delete from th table. does db2 have some sort of built-in configurable daemon? or wil i have to write my own? The db will be accessed from an applicatio server app (websphere). thanks! qin_2 -- qin_2 ----------------------------------------------------------------------- qin_23's Profile: http://www.dbtalk.net/m54 View this thread: http://www.dbtalk.net/t34251 |
| |||
| I'm not sure this will be a good fit for your solution, but it fits the "daemon" profile somewhat. MQ Listener "wakes up" and takes action action (i.e. calls a stored procedure) when it sees a new message in a message queue (MQ Series). Based on the message content, the stored proc could select row(s) to delete. Hope this helps... Pete H qin_23 wrote: > hey everyone. im looking for some sort of daemon or other type of > program that can run on/with db2 that will periodically wake up and > query a table, and depending on what it sees, it may delete from the > table. does db2 have some sort of built-in configurable daemon? or will > i have to write my own? The db will be accessed from an application > server app (websphere). thanks! > > qin_23 > > > -- > qin_23 > ------------------------------------------------------------------------ > qin_23's Profile: http://www.dbtalk.net/m548 > View this thread: http://www.dbtalk.net/t342517 |
| |||
| peteh wrote: > I'm not sure this will be a good fit for your solution, but it fits the > "daemon" profile somewhat. MQ Listener "wakes up" and takes action > action (i.e. calls a stored procedure) when it sees a new message in a > message queue (MQ Series). Based on the message content, the stored > proc could select row(s) to delete. Hope this helps... > > Pete H Could have the stored proc run by a cron job that executes on the interval specified. |
| |||
| thanks for the responses. as for MQ listener, the problem with that i as far as i can tell, it needs to get a msg from the app server to act i need it to be somewhat independent. as for cron, for now the db wil be on a windows box. i toyed with windows services, but decided not t go that way. what do other ppl do to "clean up" their database automatically? qin_2 -- qin_2 ----------------------------------------------------------------------- qin_23's Profile: http://www.dbtalk.net/m54 View this thread: http://www.dbtalk.net/t34251 |
| |||
| This may apply to your nneds. Write the script that deals with the delete conditions. Store the script in the Task Center and Schedule it. The schedule will be fixed to run every time period you specify, (every 5mins. or 1 hr., or whatever). The script could then check if the delete needs to be run and on what. HTH, Pierre. -- Pierre Saint-Jacques SES Consultants Inc. 514-737-4515 "qin_23" <qin_23.2gv1lz@no-mx.forums.yourdomain.com.au> a écrit dans le message de news: qin_23.2gv1lz@no-mx.forums.yourdomain.com.au... > > thanks for the responses. as for MQ listener, the problem with that is > as far as i can tell, it needs to get a msg from the app server to act. > i need it to be somewhat independent. as for cron, for now the db will > be on a windows box. i toyed with windows services, but decided not to > go that way. what do other ppl do to "clean up" their databases > automatically? > > qin_23 > > > -- > qin_23 > ------------------------------------------------------------------------ > qin_23's Profile: http://www.dbtalk.net/m548 > View this thread: http://www.dbtalk.net/t342517 > |
| ||||
| yep, thanks pierre. that worked. got it to run my little java program altho for some reason it doesnt like java 1.5. 1.4.2 qin_2 -- qin_2 ----------------------------------------------------------------------- qin_23's Profile: http://www.dbtalk.net/m54 View this thread: http://www.dbtalk.net/t34251 |