unload / reload blues
Posted in 1994
Topics: Storage & Space Management, Error Codes & Troubleshooting, Migration, Import/Export & Data Conversion
I can't seem to find the magical incantation to back out my data from
one Informix server and load it into another server. Any help would be
appreciated.
I am running Informix OnLine 5.02.UC1 on two machines: a runtime version
on my production machine "server01" (a Sun 4/280 running SunOS 4.1.3),
and a development version running on my test machine "server0" (a
Sun 4/110 - please try not to laugh - also running 4.1.3). The
plan was to transfer production data each evening to the test server, so
we can test with almost-live data. There is about 400 MB of data to be
transferred.
Unfortunately, Informix doesn't seem to like that plan. I can't seem to
figure out a way to transfer data expediently between the server01 and
server0.
Strike 1: (dbexport -> dbimport) - dbimport blows up about halfway
through, complaining that a column value in table R1 has exceeded
integer precision. But both the SQL "load" command, and dbload with a
proper command file, load the table with no complaints. Also, if I edit
down the .sql file produced by dbexport to include only R1, dbimport
finishes with no complaint.
Strike 2: (dbexport -> Perl script to make dbload command files ->
dbload) - Works, but I have to parse the .sql file produced by dbexport,
to find out which .unl files correspond to which tables. Plus, it takes
~8 hours, which is not a realistic time frame given the requirements I
have to meet.
Strike 3: (tbunload -> tbload) - This should be it, right? BZZZT!
tbload doesn't like the tape's contents. (BTW, /dev/rcht0 is a 4mm SCSI
DAT drive hooked up to server01.)
The following command:
server01% tbunload -t /dev/rcht0 -b 16 -s 2097152 db
completes in ~15 minutes. But then, I try "tbunload" into an empty
dbspace:
server0% tbload -t server01:/dev/rcht0 -b 16 -s 2097152 db
Please mount tape and press Return to continue ...
Error inserting system catalog record.
ISAM error: duplicate value for a record with unique key
Hmmmm, I thought - maybe it's just dirty fuel injectors. Or maybe my
system catalogs got wedged. So I proceed to do 'tbinit -i' to
initialize my root dbspace. Ran tbload again, got same result. Rebooted
server0. Ran tbload again, "ISAM error". Did tbinit -i, then rebooted,
then did tbinit -i AGAIN. Still no dice.
I even re-ran the tbunload command on server01 - same 15 minutes, same
horrible fate.
Questions:
1) How can I get a "duplicate key" error if I just wiped my dbspace?
Is there any way to kill off whatever other key is duplicated?
2) Did I miss something obvious in the tbunload/tbload sequence of
commands? Does remote access even work? (The tape appears to
spin, but not for very long.)
3) Is there a better way to do this?
Thanks in advance for any assistance.
...gwr...
George Rapp
Mail: gwr@metronet.com (home, preferred) - gwr@edsr.eds.com (work), or
Ugly: /DD.ID=MSMWHQ01.GRAPP01/@eds.diamondnet.sprint.com
Phone: 214/604-1036 (voice - work) 214/604-1126 (fax)
Quote: "Doh!" - Homer Simpson
--
George Rapp
Mail: gwr@metronet.com (home, preferred) - gwr@edsr.eds.com (work)
or: /DD.ID=MSMWHQ01.GRAPP01/@eds.diamondnet.sprint.com (work - can't reply)
Phone: 214/604-1036 (voice - work) 214/596-5096 (home) 214/604-1126 (fax)