Re: Writing into Files from Stored Procedures
Posted in 2009
What version of IDS are your running? (It is ALWAYS a good idea to post
your IDS and tools versions and your platform architecture and OS so we can
give you specific advice.)
If you are running IDS r 11.50 you can take advantage of the new Data
Capture API to basically hook a "C" or Java UDR function into the IDS
logical log subsystem and capture any or all update activity on specific
tables and do whatever you want to with the data - like write it to a file
using "C" or Java features.
If you are running any 9.xx, 10.00, or 11.xx release you can define an
EXTERNAL table as an OS flat file and have the triggers you propose insert
the changes into the external table.
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Tue, May 5, 2009 at 11:32 AM, <marc.aurele.severus@gmail.com> wrote:
>
> >
> > There isn't any particularly easy way to do that.
> >
> > As Enrique suggested, if you aren't dealing with a temporary table,
> > you can use the SYSTEM statement to run, say, dbaccess and unload the
> > data that way. It isn't very elegant; it won't be very fast. And are
> > you sure you want to trigger this every time someone selects from the
> > table? What do you envisage as the action that triggers your
> > triggered stored procedure?
> >
>
>
> I'd like to synchronise two very specific databases on two different
> servers. Network communication is not reliable, and network may
> sometimes be off.
>
> This synchronisation is a temporary solution (one or two weeks), so we
> cannot acquire an expensive software to do this.
>
> My idea : I put a trigger on INSERT, UPDATE, or DELETE statements in
> the first database. When someone inserts / updates / deletes data in
> the first database, the trigger exports the values into a file. When
> the network is available, the file is copied to the second server by
> FTP, and the second database is updated with the data.
>
> I guess there's probably a less dirty way to do this, but don't forget
> this is just a temporary solution.
>
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>