Dropping a nox-existent table
Posted in 1999
Topics: Error Codes & Troubleshooting, Platform-Specific Issues
Hi, we are using Informix 4.10 an AIX 3.2. My problem is that there is a table defined in the database (stored in systables and syscolumns) from which the files (.dat and .idx) are not exist. If I want to drop the table I get the errors 206 (Table not in DB) and 111 (ISAM error: no record found). Is there any chance of removing the table by hand (e.g. removing all correspondend line in systable, syscolumns using an editor)? Any other way of doing it? Thanks in advance. Oliver schoeni@infogrames.de
I believe you can simply create the dat and idx files from shell ( using echo > xxx.dat ), getting the names from the systables table. You can then simply drop them. If this doesn't work try running dbcheck (?? - SE table checker ) on the newly created files then drop the table. Howard Oliver Schoenwaelder wrote in message <36CBD475.F2B98DD4@infogrames.de>... >Hi, > >we are using Informix 4.10 an AIX 3.2. My problem is that there is a >table defined in the database (stored in systables and syscolumns) from >which the files (.dat and .idx) are not exist. If I want to drop the >table I get the errors 206 (Table not in DB) and 111 (ISAM error: no >record found). Is there any chance of removing the table by hand (e.g. >removing all correspondend line in systable, syscolumns using an >editor)? Any other way of doing it? >Thanks in advance. > >Oliver >schoeni@infogrames.de > >
Oliver Schoenwaelder wrote in message <36CBD475.F2B98DD4@infogrames.de>...
>Hi,
>
>we are using Informix 4.10 an AIX 3.2. My problem is that there is a
>table defined in the database (stored in systables and syscolumns) from
>which the files (.dat and .idx) are not exist. If I want to drop the
>table I get the errors 206 (Table not in DB) and 111 (ISAM error: no
>record found). Is there any chance of removing the table by hand (e.g.
>removing all correspondend line in systable, syscolumns using an
>editor)? Any other way of doing it?
>Thanks in advance.
AAAAHHHHHH !!!!
No, no, no, no, no, no !!
( well, yes there is a way, but it is NOT recommended )
systables and syscolumns aren't the only tables that contain table
information. As far as you are concerned, forget this option.
The best possible way would be to identify where the table was created and
what name informix associated to the table. You can do this in two ways:-
1. dbaccess to get into the database then type
select * from systables where tabname = "yourtable";
This will give you the tabname ( the table name ) and dirpath ( the name and
location that Informix has created the table tabname in ).
2. 'string' the systables.dat file and 'grep' for the table name.
e.g. say we have a table called 'orders'. Within the *.dbs directory, the
following would be typed:-
strings systables.dat | grep orders
This should then give you the data that you need to identify what the table
was called and its location. The table will probably have a 2 or 4 digit
number after the table name, as Informix tags the tabid onto the end of the
table name to uniquely identify it.
Once you have identified the actual dirpath and table name, just create two
files in the same directory that informix thinks they are in. These two
files should be 'yourfile.dat' & 'yourfile.idx'. chmod them to 777 ( all
access), then try to drop them again using dbaccess or SQL.
If this fails, e-mail me again with a few more details and we'll work
something out...
Sean
>
>Oliver
>schoeni@infogrames.de
>
>