How to access idx+dat informix files
Posted in 2007
A newcomer had only a Unix backup containing Informix .dat/.idx files (no original server) and wanted to read the tables, ideally via ODBC on Windows. Respondents explained that such files are either raw C-ISAM files or an SE database; since the files sat in a dbname.dbs directory and included sys*.dat catalog tables, it was confirmed as Standard Engine. The advice: install Informix SE on the new machine, copy the .dbs directory across (fixing informix ownership/permissions), set DBPATH, then use dbaccess/dbexport to produce pipe-delimited unload files and schema for migration. Endianness only matters for FLOAT/SMALLFLOAT data and could be handled if it arose. The poster accepted this plan; no outcome is reported.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET
hello, I'm absolutely new to Informix and ODBC. I need to access a few informix tables (idx+dat) that a customer gave me. I tried to use ODBC driver (IBM CSDK) in WinXP but I don't know how to configure it (server name, port number, ecc) in control panel. I need only to view table contents in any other software (MsAccess, Firebird, ecc), don't need to really connect to a informix db. Do I have to put these tables in a specific path or need to install other specific software? Any help (tutorial?) appreciated Thanks in advance Mark
Is this an Informix SE database or just a collaction of .data and .idx files? if it is just a collection of .data and .idx files you'll need C_ISAM development tools and a C compiler. if it is an SE database you'll need an unload of those files and the database schema and your own copy of Informix SE to load recreate the database. It would be a horrid job, if not impossible, to hand crank the schema details into the SE system tables manually.
On 23 Ago, 19:14, scottishpoet <drybur...@yahoo.com> wrote: > Is this an Informix SE database or just a collaction of .data and .idx > files? it's an Informix 7.2 database. To be correct I got a complete backup of a unix server with inside an Informix 7.2 db. .... > if it is an SE database you'll need an unload of those files and the > database schema and your own copy of Informix SE to load recreate the > database. It's not possible to unload those files from the original server because it doesn't exist anymore. I could install a more recent (or also 7.2) Informix version in a Windows or Linux machine and then import the old database. This is what I'do with other dbms (mysql, postgres, ..). Is it possible to do that (importing without first unloading) with Informix, or simply have I to recreate the directory structure in another machine? Sorry but I never used Informix and I don't know how it works. > It would be a horrid job, if not impossible, to hand crank the schema > details into the SE system tables manually. is this the previous case (importing without first unloading)? I hope these is a more simple way.... Thank you very much M
On Aug 23, 4:23 pm, vn <valerio.n...@gmail.com> wrote:
> On 23 Ago, 19:14, scottishpoet <drybur...@yahoo.com> wrote:
>
> > Is this an Informix SE database or just a collaction of .data and .idx
> > files?
>
> it's an Informix 7.2 database. To be correct I got a complete backup
> of a unix server with
> inside an Informix 7.2 db.
>
> ....
>
> > if it is an SE database you'll need an unload of those files and the
> > database schema and your own copy of Informix SE to load recreate the
> > database.
>
> It's not possible to unload those files from the original server
> because it doesn't exist anymore.
> I could install a more recent (or also 7.2) Informix version in a
> Windows or Linux machine and then import
> the old database. This is what I'do with other dbms (mysql,
> postgres, ..).
> Is it possible to do that (importing without first unloading) with
> Informix,
> or simply have I to recreate the directory structure in another
> machine?
> Sorry but I never used Informix and I don't know how it works.
>
> > It would be a horrid job, if not impossible, to hand crank the schema
> > details into the SE system tables manually.
>
> is this the previous case (importing without first unloading)? I hope
> these is a more simple way....
>
> Thank you very much
>
> M
You very much don't know how Informix works.
There are several classes of Informix database products (CISAM; SE;
Online; IDS versions 7, 9, 10, & 11; and XPS not to ignore RedBrick
and Cloudscape or the Pick derivatives) , however, two ONLY of these
use the .idx and .dat files to store data. There is the CISAM indexed
flat file database library which stores it's data and indexes in these
files, and the original Informix relational database, known now as
Standard Engine or SE, which uses CISAM under the hood for storage but
adds RDBMS structure to those simple files by including a set of
system catalog tables and standardizing index key formats. If you do
not have any files whose names begin with 'sys' then these are either
CISAM files or your source didn't give you the catalog. Either way
you'll have to write "C" code using the IBM CISAM library product to
access them (and without knowing the record structure or key
definitions that will not be trivial).
If you do have the system catalog tables, and the machine you are
loading the files onto is binary compatible with the source machine
(ie same endianness and binary data formats for integers and floating
point data) then you should be able to purchase and install the IBM
Informix SE database server software on the machine, place the files
in a directory named <databasename>.dbs, set the environment variable
DBPATH to the path of the .dbs directory and you'll have access to the
database through the dbaccess native Informix query tool.
Getting ODBC access to an SE database server is not simple enough to
explain here (you'll need another product or two in addition to doing
some configuration), but doable, or you could just extract the data
using the query tool and process the flat files or load them into
another database server. I'd contact IBM or a competent Informix
consultancy thats familiar with SE and CISAM if I were you.
Art S. Kagel
vn wrote: > On 23 Ago, 19:14, scottishpoet <drybur...@yahoo.com> wrote: >> Is this an Informix SE database or just a collaction of .data and .idx >> files? > > it's an Informix 7.2 database. To be correct I got a complete backup > of a unix server with inside an Informix 7.2 db. If you've got .dat and .idx files, they should be in a directory somename.dbs, and it is then an SE database. > .... >> if it is an SE database you'll need an unload of those files and the >> database schema and your own copy of Informix SE to load recreate the >> database. > > It's not possible to unload those files from the original server > because it doesn't exist anymore. > I could install a more recent (or also 7.2) Informix version in a > Windows or Linux machine and then import > the old database. This is what I'do with other dbms (mysql, > postgres, ..). > Is it possible to do that (importing without first unloading) with > Informix, > or simply have I to recreate the directory structure in another > machine? > Sorry but I never used Informix and I don't know how it works. If you have SE on the new machine, you should be able to copy the directory and files onto the new machine and point SE at it and with only a small modicum of luck (and some permission fixing - the files should belong to group informix, which you'll have OK since you've got SE installed on the machine), you should be away. You might have to do some research to get the ODBC connection string resolved, and you might need to run sqlexecd (though I'd hope you wouldn't). If you are simply going to use DB-Schema to export the data, you won't need sqlexecd. >> It would be a horrid job, if not impossible, to hand crank the schema >> details into the SE system tables manually. > > is this the previous case (importing without first unloading)? I hope > these is a more simple way.... If you don't have the system catalog, it can be tedious, difficult, and irksome to reverse engineer the schema. If you know the table structures, it isn't too bad. But you're better off with using SE and DB-Export (comes with SE) to generate pipe-delimited unload files and the SQL schema. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/
Thank you all and sorry for my Informix total non-kwnoledge. Yes, I have sys*.dat files in my dbname.dbs directories. I'll try to install an Informix SE on the new machine, point to database and export to pipe-delimited. ODBC would be at this time unnecessary: my only task is to migrate to other DBMS. Just a question about endianness and binary format. If I can't get information about the source machine how can figure out binary format problems. I mean, I'll realize about this after the installation of SE and data access on the new machine or are there tools that can analyse data before? and if I'm out of the luck (a little endian machine i.e.) can I solve the problem? Thanks again M
vn wrote: > Thank you all and sorry for my Informix total non-knowledge. > Yes, I have sys*.dat files in my dbname.dbs directories. Confirmed SE sighting. You're pretty safe from here. > I'll try to install an Informix SE on the new machine, point to > database and export to pipe-delimited. ODBC would be at this time > unnecessary: > my only task is to migrate to other DBMS. > Just a question about endianness and binary format. If I can't get > information about the source machine how can figure out binary format > problems. I suggest crossing that bridge when you reach it. Most of the data is stored in an architecture-neutral format - the only types that are machine dependent are SQL FLOAT and SMALLFLOAT data (C double and float). If you know the hardware it came from - Intel perchance? - then it can be dealt with if necessary. If it came from a more esoteric platform, then we an guess it was likely to be IEEE 754 data in one or the other endian-ness and can fix it up if we have to. If you don't know the source platform, we may have to do some guessing (starting with IEEE 754), but the values are usually obviously wrong. If you see values that should be comfortably in the 'normal' range coming out as 1E-308, you know there's something wrong with your interpretation of the data. If the database used DECIMAL or MONEY instead of FLOAT and SMALLFLOAT, then you wont even have to worry about these esoteric issues. > I mean, I'll realize about this after the installation of SE and data > access on the new machine or are there tools that can analyse data > before? > and if I'm out of the luck (a little endian machine i.e.) can I solve > the problem? If you run into a roadblock, get back to us - c.d.i or informix-list. And if you want to be pre-emptive, investigate the software in the IIUG Software Archive. It is far from insoluble given that you have the complete system catalog. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/