Data Migration
Posted in 1994
Topics: Migration, Import/Export & Data Conversion, Platform-Specific Issues
Hi all, I'm running Informix On-Line 5 under AIX 3.2.5 Situation: I want to unload information out of a table in one database and reload it into another databse for testing. There are two tables I am unloading. One header and the corresponding detail table. The header table has a serial value for a doc_no which provides a unique key. The detail table is linked to the header via that serial doc_no which is contained in an integer column. Problem..: When I reload into the test database, informix will want to reassign the serial numner in the table for each row I insert. If that happens, I will loose my link between my header and detail. Question.: I thought of two possible solutions: 1) place a value in the header table on the test database that has a value in the doc_no that is 1 less then the values of the data I am about to load (the data I am about to load is sorted by the doc_no). Will informix see that value and automatically start with the right number? 2) alter the structure of the table and replace a serial value with an integer value, load the data, then alter the table again to change it back to serial (is this safe?) -- +---------------------------+ +------------------------------------+ | Craig Szczublewski |+ | crszczub@jupiter.cse.utoledo.edu |+ | Unique Systems, Inc. || | 4gen!unique!craig%uunet.uu.net || | 5610 Monroe St. Suite 210 || |------------------------------------|| | Sylvania, OH 43560 || | A few munce ugo i cudn't evin spel || | (419) 882-1113 || | injunear, now i ar won. || +---------------------------+| +------------------------------------+| +---------------------------+ +------------------------------------+