Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

re-creating .idx file

297 views
Skip to first unread message

Kevin P.

unread,
Dec 27, 1996, 3:00:00 AM12/27/96
to

oops! i hammered an .idx file while trying to "fix" an indexing
problem with one of the tables in my system. yes, i know that
it says practically everywhere in the manuals not to do this,
but i figured if it was hosed already, what could it hurt. so,
while i sit here listening to my multiple tape backup set whir,
i figured i'd also ask the experts.

the details:

informix se v4.00
sco unix v3.2v4 (for what its worth)

i accidentally deleted the tablename.idx file, although the
tablename.dat file is still there. is there a way to re-create
the .idx?? i have tried CHECK TABLE, REPAIR TABLE,
but no luck.

please e-mail response to me.

kpav...@themailroom.com

thanks
-k

Billy Wheeler

unread,
Dec 27, 1996, 3:00:00 AM12/27/96
to

On 27 Dec 96 at 16:06, Kevin P. wrote:

> oops! i hammered an .idx file while trying to "fix" an indexing
> problem with one of the tables in my system. yes, i know that it
> says practically everywhere in the manuals not to do this, but i
> figured if it was hosed already, what could it hurt. so, while i sit
> here listening to my multiple tape backup set whir, i figured i'd
> also ask the experts.

The experts are all on leave, so you'll have to make do with me...

Right:

1. Create a table (newtable)which is an exact duplicate of your
damaged table (badtable), including all indexes.
2. Copy the newtable_xxx.idx to badtable_xxx.idx.
3. bcheck -y badtable*.dat

Voila. Quicker than restoring a backup. (If it works). :-)

HTH.
--
Ciao,

Billy

I'd be in favour of apathy, but I just couldn't be bothered...

Mark D. Stock

unread,
Dec 30, 1996, 3:00:00 AM12/30/96
to Kevin P.

Kevin P. wrote:
>
> oops! i hammered an .idx file while trying to "fix" an indexing
> problem with one of the tables in my system. yes, i know that
> it says practically everywhere in the manuals not to do this,
> but i figured if it was hosed already, what could it hurt. so,
> while i sit here listening to my multiple tape backup set whir,
> i figured i'd also ask the experts.
>
> the details:
>
> informix se v4.00
> sco unix v3.2v4 (for what its worth)
>
> i accidentally deleted the tablename.idx file, although the
> tablename.dat file is still there. is there a way to re-create
> the .idx?? i have tried CHECK TABLE, REPAIR TABLE,
> but no luck.

You have to create the file before attempting a repair.
If that still doesn't work, then restore the old .idx file then run a
repair.

Hope that helps,
--

Mark.

+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:ma...@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+


Susik Lee

unread,
Dec 30, 1996, 3:00:00 AM12/30/96
to

I'm not sure this will work or not:
- copy idx file from one of other table where there is no index.
- go into dbaccess or isql, than try to create index

Susik


______________________________ Reply Separator
_________________________________
}Subject: re-creating .idx file
}Author: The Mail Room, Inc.::(THMLRI) at ~FABRIK
}Date: 12/27/96 8:06 AM


}
}
}From: Kevin P.
}Date: Fri, Dec 27, 1996 8:06 AM
}Subject: re-creating .idx file
}To: informix-list; Susik Lee
}oops! i hammered an .idx file while trying to "fix" an indexing
}problem with one of the tables in my system. yes, i know that
}it says practically everywhere in the manuals not to do this,
}but i figured if it was hosed already, what could it hurt. so,
}while i sit here listening to my multiple tape backup set whir,
}i figured i'd also ask the experts.
}
}the details:
}
}informix se v4.00
}sco unix v3.2v4 (for what its worth)
}
}i accidentally deleted the tablename.idx file, although the
}tablename.dat file is still there. is there a way to re-create
}the .idx?? i have tried CHECK TABLE, REPAIR TABLE,
}but no luck.
}

}please e-mail response to me.
}
}kpav...@themailroom.com
}
}thanks
}-k
}

}----------
}Received: from rmy.rmy.emory.edu by portia.fabrik.com
} with SMTP (Fabrik F07.0-000)
} id SINN.5...@portia.fabrik.com ; Fri, 27 Dec 1996 09:30:47 -0800
}Received: (from ilist@localhost) by rmy.rmy.emory.edu (8.7.1/8.7.1) id MAA28645
}
}for susi...@uica.com; Fri, 27 Dec 1996 12:31:15 -0500 (EST)
}From: "Kevin P." <kpav...@themailroom.com>
}Message-Id: <01bbf40f$fc49c380$04d0...@tosheeba.themailroom.com>
}Subject: re-creating .idx file
}Date: 27 Dec 1996 16:06:58 GMT
}Reply-To: "Kevin P." <kpav...@themailroom.com>
}Organization: The Mail Room, Inc.
}Sender: informix-...@rmy.emory.edu
}To: inform...@rmy.emory.edu
}X-Informix-List-To: susi...@uica.com
}X-Informix-List-Id: <news.32017>
}
}----------
}

James L. Gehring

unread,
Dec 30, 1996, 3:00:00 AM12/30/96
to

Note: usually you can unload the data since no indexes are required to dump
data. Then drop the table and reload, creating indexes after the loading is
completed. If you hosed your idx file shuffling files "usually" doesn't
help because the system (Informix) still thinks there is and index there.

JLG

26#e#Susik_Lee_at_United#u#Group#c##c#25#e#PC_CCMailSusik Lee
<@MAIL.FABRIK.COM> wrote in article <5a8qj9$r...@cssun.mathcs.emory.edu>...


> I'm not sure this will work or not:
> - copy idx file from one of other table where there is no index.
> - go into dbaccess or isql, than try to create index
>
> Susik
>
>
> ______________________________ Reply Separator
> _________________________________
> }Subject: re-creating .idx file
> }Author: The Mail Room, Inc.::(THMLRI) at ~FABRIK
> }Date: 12/27/96 8:06 AM
> }
> }
> }From: Kevin P.
> }Date: Fri, Dec 27, 1996 8:06 AM
> }Subject: re-creating .idx file
> }To: informix-list; Susik Lee
> }oops! i hammered an .idx file while trying to "fix" an indexing

<Stuff Removed>

Larry Hibbs

unread,
Jan 2, 1997, 3:00:00 AM1/2/97
to

Two years ago I ran into this situation when a backup saved all of the
.dat files and none of the .idx files. I called Informix and asked them
what to do. They said, "Let us know how you do it, Have a nice day". :-(
SO...I created a duplicate database (with .idx) and copied the .idx files
with the new numbers associated with the .dat files. Just as Billy
Wheeler stated below. But the SELECTs did not return all of the rows
(even after bchecking) in the table. I had to INSERT into the tables
dummy records until all of the "holes" in the file were filled. The end
of file pointer is screwed up when the new .idx file is accessed. The
pointer thinks the first hole (a deleted row in the table) is the end of
the file. When the dummy record is inserted into the table the EOF file
pointer drops to the next vacant row. So you have to fill up the table.
Next you can either unload the table where the rows aren't dummy records
or just delete the dummy rows and run a bcheck -ys. Hope this helps.
Sorry It's a little late,
Larry Hibbs
lh...@dillon.com

> bi...@west.co.za ("Billy Wheeler") wrote in article
<5a153n$c...@cssun.mathcs.emory.edu>...


> On 27 Dec 96 at 16:06, Kevin P. wrote:

> > oops! i hammered an .idx file while trying to "fix" an indexing

> > problem with one of the tables in my system. yes, i know that it
> > says practically everywhere in the manuals not to do this, but i
> > figured if it was hosed already, what could it hurt. so, while i sit
> > here listening to my multiple tape backup set whir, i figured i'd
> > also ask the experts.

Noble Systems Corp

unread,
Jan 5, 1997, 3:00:00 AM1/5/97
to

"Kevin P." <kpav...@themailroom.com> wrote:

>oops! i hammered an .idx file while trying to "fix" an indexing
>problem with one of the tables in my system. yes, i know that
>it says practically everywhere in the manuals not to do this,
>but i figured if it was hosed already, what could it hurt. so,
>while i sit here listening to my multiple tape backup set whir,
>i figured i'd also ask the experts.

>the details:

>informix se v4.00
>sco unix v3.2v4 (for what its worth)

>i accidentally deleted the tablename.idx file, although the
>tablename.dat file is still there. is there a way to re-create
>the .idx?? i have tried CHECK TABLE, REPAIR TABLE,
>but no luck.

Excuse me, but can't you just "touch <filename>.idx" and then run a
bcheck -s? Since the bcheck -s doesn't even *try* to read the existing
.idx (it just renames it to *.IDX) that *should* do it.

0 new messages