ways to detect that a table was changed ?
Posted in 1999
Topics: Triggers, Constraints & Referential Integrity, Platform-Specific Issues, Java & JDBC Development
Hi, (Sorry if I posted it twice, I didn't see it in my newsreader). My application needs to refresh its copy of data if some tables are changed. Ideal solutions would be that: 1) Configure Informix to generate a Unix (or some kind of) signal to the applic. when a table(or column of a table) is modified -OR- 2) setup a trigger to run a unix program to generate signal to our applic. But I guess, informix doesn't support above schemes. Or does it ? Or, how about: 3)does informix provide timestamps of tables or columns so an applic. checks periodically if a table or a column was changed(just like timestamps of files)? If this is possible, where is this data in database and how to access it? Otherwise, my other crude options are: 4) define tables to hold timestamps, and setup triggers on every column these timestamp-tables which are periodically monitored by applic. 5) Not use create timestamp-tables but have applic. check periodically and do some in-direct processing (and I have few possible thoughts) like doing logical diffs on data etc. We are using informix 7.3 and solaris 2.6. (BTW, the applic. is in Java). Being able to detect a table change is also useful for administrators. Any opinions or experiences that you can share ? Thanks AH
Hi In article <7c3mv8$4u5$1@mail.eclipse.net>, hash100@mail.eclipse.net (Atiq Hashmi) wrote: > > Hi, > (Sorry if I posted it twice, I didn't see it in my newsreader). > > My application needs to refresh its copy of data if some tables are > changed. > Ideal solutions would be that: > 1) Configure Informix to generate a Unix (or some kind of) signal > to the applic. when a table(or column of a table) is modified -OR- In this case you can use Informix audit system. Setup the system with "Alter Table"(ALTB) ,"Rename Table/Column" (RNTC) or any events that you want for public or somebody. After that you'll have a lot of ways for running applications/generating an Unix signal (onshowaudit + some shell in cron , create special database for last changes and use the database and etc. ) > 2) setup a trigger to run a unix program to generate signal to our > applic. It's so boring ;-) Regards, Eugene Nechayev -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own