?
Solved

Btrieve "get Next Extended" and Error Code 2

Posted on 1998-09-15
2
Medium Priority
?
661 Views
Last Modified: 2008-02-01
Hi Btrieve-Freaks!

we have observed the following odd phaenomenon:

Environment:
-2 server with Novell 4.11 and one with Novell 3.12
-several clients (WIN 3.11 and WIN 95)


At one of the "4.11" we have Btrieve 6.1 running, on the clients the corresponding requester. Our application (a WIN 16 Bit app) uses Btrieve. We are using Btrieve-Files with one internal index (autoincrement) and (as desired) several external indices.
To create external indices we are using extended operations:
to read the records "Get Next Extended" (Code 35) and to write the keyrecords
"Insert extended" (code 40): filling a buffer with the records, writing its key
and than fill the buffer again and so on.

On several 3.12 Networks this works fine even for large Btrieve-files
(i.e. more than 300 000 records). But in the configuration described above
we get after some secessfull "get next extended"/"insert extended" cycles
we receive suddenly Btrieve Error code 2 on the next "get next extended"
operation..
The number of sucessfull cycles depends seemingly on the length of the key
in question.

All ohter operations are working well.

We tried the following yet:

- Turn of all the servers but one 4.11
                  --> try --> error 2
- Copy the whole stuff to the 3.12, start btrieve on it
                  --> try --> error 2
- Turn off the Turbo FAT (turbodis.nlm from Novell)
                  --> try --> error 2
- checked, wether the Btrieve-file is corrupt in any sense
  by copiing the file to a network, where our app workes
  fine. On this other Network the problm does not appear
- Try several different options for
  btrieve.nlm and bspxcom.nlm
      --> try --> error 2
- Checked the drivers for the ethernet-cards on the  
  client-computers all are seemingly up to date and
  correct.

We have installed ethernet switches, but the problem behaves as before.

Any idea?
0
Comment
Question by:nmm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
brosenb0 earned 1200 total points
ID: 1593431
A Btrieve MicroKernel status code 2 is disk I/O related and in no way is affected by communications infrastructure.

Here are the causes of this error: -

1) The file is damaged, and you must recover it.  Use BUTIL -RECOVER & -LOAD.

2) In NetWare, at least one MicroKernel data file is flagged as Shareable. All
MicroKernel data files should be flagged as Non-Shareable. The MicroKernel is
the only user that accesses the files (on behalf of many users). As the only user,
the MicroKernel can control the integrity of the data files. If you flag your
MicroKernel data files as Shareable, data corruption can occur.

3) For pre-v6.0 data files, there is a large pre-image file inside a transaction, and
there is not enough disk space for a write to the pre-image file.

4) For pre-v6.0 data files, there is one pre-image file for multiple data files. For
example, if you name the data files CUSTOMER.ONE and CUSTOMER.TWO,
both files have pre-image files named CUSTOMER.PRE.

5) For pre-v6.0 data files that are larger than 768 MB, there is a conflict among
locking mechanisms. The file has not been corrupted. Your application can retry
the operation until the conflict is resolved (when the competing application
releases the lock your application requires).

6) A pre-v6.0 Btrieve engine attempted to open a v6. x or later MicroKernel file.

At the bare minimum consider upgrading your Novell Btrieve v6.1 to Pervasive Btrieve v6.15.  Pervasive SQL is even better as it contains Btrieve v7.0 which is significantly enhanced.  Btrieve v7.0 can handle up to 16GB data files (it auto-creates extension files if the OS file size limit is reached), performs up to 20x faster at the server and provides system enforced transactions.  There are many other features to numerous to list.  Check out www.pervasive-sw.com.

You mentioned you are using NW4.11.  A common trap for young players when moving a Btrieve app to 4.11 is the OS file size limit.  This may or may not be related to your problem but worth a mention to save you the heartache. NW 3.x has a file size limit of 4GB.  NW 4.11 also has a file size limit of 4GB, however, only if block suballocation is turned off.  This is not the default scenario when creating a volume as the optimum configuration for I/O performance, without wasting big chunks of disk space on small files is 64KB blocks with suballocation.  Suballocation "scavanges" parts of blocks that were previously allocated but not fully utilized for further allocation.  With sub-allocation turned on the file size limit is reduced to 2GB.  Versions of Btrieve prior to v7.0 do not create extension files and as such may be impeded by the OS file size limit.  You can only disable block suballocation when the NetWare volume is created.

Good Luck.
0
 

Author Comment

by:nmm
ID: 1593432
Hi brosenb0,
the btrieve-Files in question where created with btrieve 6.15
and the error occured in a 6.10 envronment.
There are a short remark in the btrieve 6.15 programmers manual, that the autoincrement-feature has been improved in 6.15

So we suppose now, that the 6.15 "look" damaged for the 6.10 btrieve.

We will upgreade at least to 6.15...


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question