Re: Copying an informix database with "cp"
Posted in 1992
>From: Tony Heskett <uunet!bnr.co.uk!A.Heskett>
>Message-Id: <9206091755.26284@bay.bnr.co.uk>
>Subject: Re: Copying an informix database with "cp"
>Date: Tue, 9 Jun 92 18:55:10 BST
>X-Informix-List-Id: <list.1226>
>
>Helge Egelund Rasmussen writes:
>> I want to take a copy a informix database, ...
>> Is it ok to use cp to copy the database files to another directory,
>> or does the db files contain absolute pathnames?
>
>If the database is logged, systables contains the absolute path to
>the log file. For example,
>
> create database foobar with log in "/u2/theskett/foobar2";> strings foobar.dbs/systables.dat | grep syslog
Sometimes, altered tables acquire absolute pathnames too. You can update
the pathname column in systables if you are the creator of the database or
informix -- it depends slightly on which version of SE you have. Be very
careful when you do this -- do the editing with a copy of the database
somewhere at hand in case you botch it. If you can afford to wait until I'm
next in the office, I can probably forward a shell script which disables
the transaction log and removes all absolute pathnames from Systables.
>> Is there a better way to copy the database?
>..., but I've had complete
>success with this (and ftp between architectures !), so suggest
>you go right ahead. Might make sure no-ones using it before you
>start the cp, tho'.
Someone in Informix asked about this too -- I said:
For all the Informix data types except FLOAT and SMALLFLOAT, the data is
stored in a machine-independent format. That means that if your database
avoids the FLOAT and SMALLFLOAT types, you can take a database from an
Intel box and do a straight copy onto a Motorola box, and it will work on
both machines. The same applies to p-code files, except that p-code files
by definition don't contain FLOAT and SMALLFLOAT numbers -- they're all
encoded as DECIMAL values.
If you do have FLOAT and SMALLFLOAT values in your database, you must do
the unload if you swithc machine architectures -- nothing is worse than
seeing that the debtors to your company all owe 1.0E-308 and you owe
1.0E+308 to all your creditors, which was roughly the effect of moving
Motorola FLOAT data to Intel boxes.
Yours,
Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>