Re: Accessing another DB with Logging
Posted in 1997
Nils Myklebust wrote: > > David Williams <djw@smooth1.demon.co.uk> wrote: > > :In article <5vnbna$lf4@cssun.mathcs.emory.edu>, gary.vaughan@workcover.n > :sw.gov.au writes > :> > :> > :> I have written a 4gl program that reads from one database across a network > :> and inserts into another, which has been working fine. Now they want to > :> change the source database to use logging, but the database that the > :> program is inserting/updating is not using logging at all. Is there anyway > :> around this ?? [SNIP] > I would however consider using 4gl to write the data to a file, switch > database and read from that file to do the inserts using some of the c > utilities available at the iiug site. You could also use separate connections one for each database. I have not yet tried to create and ESQL/C function set to set and switch from one connection to another but it works great in ESQL/C alone. Indeed, I have found that the rewitten programs using separate connections for accessing each remote database actually runs faster than accessing those databases from one connection as remote selects. I know that 4GL does not yet support connections, but, you should be able to write an ESQL/C function to create the multiple connections and another function(s) to change between connections. With separate connections you are not violating the logged -vs- non-logged restriction and are still able to copy from one database to another. BTW I wrote such a database copy utility to help migrate our databases from 5.0x non-logged databases to logged databases in 7.xx. The utility (dbcopy.ec) was not included in the utilities I uploaded to the IIUG archives because I did not think that it was generally useful. Dbcopy is very efficient and we have been able to run 40 copies simultaneously between two 7.xx instances on separate machines over FDDI to copy large tables quickly. If you have ESQL/C and want the source code let me know via direct email. (That goes for anyone else who is interested as usual.) Art S. Kagel