Converting Lock methods
Posted in 1992
I'm now in my second day of running production with 4.1 and there haven't
been any problems that weren't caught in the testing period, so far ;-)
This is not a bug report, but just a tip on something that threw me briefly
when I did the conversion.
On my platform (SE on a sun4), a side effect of upgrading to 4.1 was that the
DB engine changed locking schemes: no more .lok files! This was mentioned in
the release notes, which said that to convert the locks I should set the
RESETLOCK environment variable.
What wasn't obvious to me from the release notes was that the new engine
wouldn't open my old databases AT ALL unless the environment variable was
set. This caused a few minutes of panic, until I connected it with the
locking issue; if I hadn't read the release notes, I would have been lost ...
The release notes say you should read each table in the database with
RESETLOCK set. I did this by constructing a script that did
select * from xyz where ROWID < 5for each table in the database (for each of three databases, in my case :-().
After this, you can run without RESETLOCK being set. The .lok files are still
there, but it appears to be safe to remove them.
Hope this saves someone those few minutes of panic ...
-- Harry Bochner
-- bochner@das.harvard.edu