This information has been extremely helpful!

I had 11 files have the indexes go bad on them, and they needed to be 
completely rebuilt.
The only anomaly is that the "DELETE.INDEX fn ALL" didn't work right away.

There was an index on the file, a V-field, called "XERP.SQLTRIG".  When the 
index
went bad, it was there, but not really there.  On a file called STUMAST for 
example,
I would say:

:LIST.INDEX STUMAST
No indices created on file "STUMAST"
:

Then I would say try to create the index:
:CREATE.INDEX STUMAST XERP.SQLTRIG
"XERP.SQLTRIG": can not create multiple indices on same location
No new indices are created
:

So UniData sort of knows the index was there, but it doesn't really know.  And
unfortunately, that is my problem.

I tried to delete it:
DELETE.INDEX STUMAST ALL
No indices created on file "STUMAST"
:

And the create index would fail again.  So what I did was create another
index, I actually indexed @ID, then the "DELETE.INDEX STUMAST ALL"
did work, and I was able to re-install my original XERP.SQLTRIG index.

So, basically, by creating (I did not actually have to build) a bogus index and
then doing the "DELETE.INDEX fn ALL" it did solve my problem.

Is this a UniData bug or two that might be looked into by any chance?  :-)

(I saw my issue on UniData 7.2.2 for Windows)

Thanks!

Steve...
--
Steve Kneizys
ERPData, LLC
Ferrilli Information Group


-----Original Message-----
From: Wally Terhune <wterh...@rocketsoftware.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
Sent: Fri, Sep 9, 2011 7:36 pm
Subject: Re: [U2] Unidata 7.1.22 Index Issue


NO.
 was mostly trying to point out that you need to be specific about what 
perations you have done regarding index refreshing. 'rebuild' is unspecific.
For logical integrity issues - which generally occur because folks create 
ndexes that depend on another file to get the virtual field index value (such 
s via TRANS, or OCONV(TFILENAME,...)) - you can just BUILD.INDEX on one or more 
r all indexed fields in a file. If you don't use the ONLINE keyword, users 
rying to update the primary file will hang until the build is done (or will not 
tart if it cannot get exclusive update access on the primary file).
If you have physical corruption to the index file (rare), you need to 
completely 
emove the index file (by using the ALL keyword with DELETE.INDEX). Then 
REATE.INDEX, then BUILD.INDEX. If you run multiple DELETE.INDEX commands naming 
ields - until none are left - the index file is still there and may still 
ontain some physical corruption.
You can see if you have either logical or physical corruption by running 
uide_ndx. You can check for both using the -x3,all option. Then look at 
UIDE_XERROR.LIS output file. Note - guide_ndx does not block updates to the 
ile (as BUILD.INDEX without the ONLINE keyword does), so you can get spurious 
ogical errors if the file is being actively updated when you run it.
If you aren't sure and don't want to check, the cleanest steps are:
) get exclusive access to the file
) DELETE.INDEX fn ALL
) CREATE.INDEX fn <field1 field2, etc>
) BUILD.INDEX fn ALL  (this is quicker than individual BUILD.INDEX commands on 
ultiple fields as there is only one pass thru the primary file to create the 
MP records used to create the index nodes).
More confused, now? :-(
Wally Terhune
2 Support Architect
ocket Software
600 South Ulster Street, Suite 1100 **Denver, CO 80237 **USA
el: +1.720.475.8055
mail: wterh...@rs.com
eb: www.rocketsoftware.com/u2

-----Original Message-----
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
n Behalf Of Kevin King
ent: Friday, September 09, 2011 5:20 PM
o: U2 Users List
ubject: Re: [U2] Unidata 7.1.22 Index Issue
Am I understanding you correctly Wally that if an index becomes corrupted
or any reason the index is to be deleted, then recreated, and THEN rebuilt?
And in a related question, am I understanding you to say that an index
annot (should not) be rebuilt without being deleted and recreated?
______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to