RE: Writing into Files from Stored Procedures
Posted in 2009
Hmmm.
If you can put MQ in the engine and do a publish/subscribe messaging, then you should be able to do what you want.
If you write your stored procedure in either C/ESQL-C or Java, you should be able to write data out to a file. (At least in theory).
As Johnathan pointed out, there could be some side effects. I don't know if you will have performance issues because if the trigger is calling a stored proc that writes to a file, does that cause any locks or waits? I don't know because I never tried it.
HTH
> From: marc.aurele.severus@gmail.com
> Subject: Re: Writing into Files from Stored Procedures
> Date: Tue, 5 May 2009 08:32:01 -0700
> To: informix-list@iiug.org
>
>
> >
> > 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
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009