Copying and Renamin Tables to diffent dbs
Posted in 1994
Bonnie Weller wrote: >I am new to Informix and have not found any reference to whether I can >copy or rename a table to a different database. What about copying >strucures to a new empty table and loading different data in a new >database. I know how to do this in FoxPro but have not seem similar >capabilities in Informix. >If I can do these things, how. And if these commands are in the Informix >books, where? I searched the indexes and found nothing. I had a somewhat similar sitation some years ago where I wanted to share a table between two databases. Having created the an identical table in the second database I then used the Unix ln function to link the tablename.dat and tablename.idx files from the first database to the second. You have to be careful, of course, because if you get the order wrong you'll wipe your original data. It seemed to work reasonably well, in that I, as the database owner, could update the table in *either* database and it would automatically update in the other, although I seem to remember other users having occasional permission problems on UPDATE or INSERT. I *know* this is totally undocumented, and probably unsupported by Informix, but is there any reason why it shouldn't work? I would think mv or cp should work likewise. Has anyone out there tried this? ** Opinions expressed are my own and not necessarily those of my employer ========================================================================= Barry Toomey Phone +353-1-2822333 AT&T Network Systems Ireland Fax +353-1-2822864 Corke Abbey Avenue, email: bt@irl3b2c.att.comm Bray, uunet: att!irl3b2c!bt Co. Dublin Ireland =========================================================================