Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Corrupted index(s)

Status
Not open for further replies.

virgo

Programmer
Jun 21, 1999
88
0
0
US
I inherited a large Foxpro 2.5 and 2.6 database that runs on NT.<br><br>This was originally set up as peer to peer.<br><br>On reindexing the database files (that are huge), there was binary that 'snuck' in.&nbsp;&nbsp;Needless to say, the indices do not work well.&nbsp;&nbsp;And, programs that depend on them do not work at all.&nbsp;&nbsp;And, as usual, the users want things yesterday.<br><br>On reindexing, which I have tried 3 times, at varying times yesterday and this morning, I just get different types of binary.<br><br>I would really appreciate it if someone has some ideas.&nbsp;&nbsp;I ran out of them this morning.
 
Virgo,<br><br>Not quite sure what you mean by &quot;binary that 'snuck' in&quot;.<br><br>Are you using the REINDEX command?&nbsp;&nbsp;In cases of corrupted indexes, it is usually recommended that you delete the existing index files and then manually recreate them from scratch. <p>Andy Blay<br><a href=mailto:a.d.blay@talk21.com>a.d.blay@talk21.com</a><br><a href= > </a><br>
 
Binary snuck in<br><br>I get messages....<br><br>file name,&nbsp;&nbsp;index name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'binary of various types'&nbsp;&nbsp;&nbsp;of file.<br><br>I have been using reindex.&nbsp;&nbsp;I thought about the fact that I was just compounding the error.&nbsp;&nbsp;<br><br>The indices are all cdx.&nbsp;&nbsp;I don't know for sure what they were made of and I have no idea at all in terms of the order in which they were put.&nbsp;&nbsp;<br><br>Meanwhile, I have some other programs that are failing because they can't find the appropriate index.&nbsp;&nbsp;<br><br>The two files with the corrputed indices are in the gigabyte range. <br>
 
if you have an ftp program connect to:<br>server = ibs.internationalbid.net<br>username = fpug<br>password = 73897253<br><br>There are programs in the directory \sharedcode\sysindex\fpw that can help you.<br>The Word Document Sysindex.doc tells you about files.<br>There is a database (SysIndex.dbf & SysIndex.fpt) there that you must populate.<br>The Prg DataChk will return a logical if there is a stray binary code in a memory variable.<br>The Prg DbfCheck runs datachk against every field in in a table in the SysIndex database.<br>The Prg CdxStru will collect the index information for every file in the sysindex database.<br>The PrgThe Word Document Sysindex.doc tells you about files. will rebuild the indexes from scratch for every file in the sysindex database.<br><br>Warning - Use the programs at you own risk.&nbsp;&nbsp;Run tests against backup files first. The code is your to use/atler/pass around as you see fit.<br><br>There is a VFP Version in the directory \sharedcode\sysindex\vfp. <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Thank you.&nbsp;&nbsp;I now have things to try.
 
Make a backup file and open all the tables and in command window type DISPLAY STATUS. This will display the index structure. Note all the indexes structure and then delete the tag file (*.cdx). Make new index file based on the structure you noted. e.g.<br><br>Disp stat<br><br><br> c:\patient.dbf<br><br>STRUCTURAL INDEX patient.cdx <br><br>INDEX TAG NAME Primaryindex      alltrim(name)+dtoc(dob)<br>INDEX TAG NAME Secondkey         alltrim(recno)<br><br>Now when you will delete patient.cdx it will delete Primaryindex and secondrykey tags.<br><br>Now make new index file by using the same structure shown above.<br><br>farrukh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top