How do you know what a given Btrieve/Pervasive file open error means?
Advanced Accounting and TAS Premier/Professional programming language-based applications most typically use the Btrieve/Pervasive database manager (sometimes referred to as the "record manager" or "database engine") implemented in various configurations. Traditionally the "Btrieve" product has been an engine interface to an application rather than a database management system. Newer versions do now have the availability of a user interface layer making it closer to a DBMS rather than solely a record manager as in days past.
The trademark "Btrieve" is no doubt derived from the term B-tree coined by Rudolph Bayer and E.M. McCreight in 1972 relating to a tree database structure used for indexing (finding) binary data. The origination of the term B-tree in turn perhaps might have been formed as a different kind of "binary tree" although they are not synonymous. (Perhaps the "B" related to primary author "Bayer" and tree for the related data "tree" structure; the authors did not indicate why they chose the term B-tree in their 1972 article.) The methodology employed by the Btrieve microkernel engine for database indices, and which also became the industry standard, is B-tree searching.
At one time Btrieve software was owned by Novell, but that has not been the case now for a very long time. Many other software applications also use Btrieve or more commonly in today's world, Pervasive.SQL. (Peachtree accounting software for example uses it but its installations limit its functionality and it does not provide the user layer interface nor all of the utilities and management tools.) The term "Btrieve" is still used informally when discussing status codes and database engine issues.
Btrieve/Pervasive database engines remain a robust, cost-effective option for data intensive software applications. They have the ability to scale from a single user to hundreds of users and, in an on-premises environment, rival Microsoft SQL in terms of performance as well but usually at far less cost.
When the Btrieve/Pervasive database manager encounters a problem, typically a "status code" number is returned (historically returning a one to three digit number, and later expanded to four; SQL errors can be up to five numeric characters). There are therefore many potential responses.
When a status code is returned that involves a specific data file error/status code, it is then very important to investigate and resolve; the application should not continue to be used until that occurs. In the case of a status code 2, for example, when a program tries to open or save to a given data file, that status code means that an I/O error has occurred and that the data file must be repaired (often simply reindexed, but not always) before any further "writes" are attempted. In other words, it must be given immediate attention. The "2" error will persist and not go away with continued use and usually never indicates a temporary problem of any kind.
Users are plagued with warnings and error messages responses from the operating system, anti-virus programs, other programs, etc. and quickly become anesthetized to this constant barrage of messages. This has become much worse with newer versions of Windows and the infamous UAC (user account control) which excessively tends to burden the user with its constant questions and messages. This then tends to lead a user down a road of simply ignoring error messages that do not stop the application dead in its tracks.
But in the case of a status code such as a 2 in the case of Btrieve/Pervasive applications, it should not be treated like a "check engine" light but more like a flat tire: you need to pull over and stop!
Understandably, end users typically are not aware of this, they may continue to try to continue to use the program and create even more problems requiring manual repair efforts.
(And as an aside with respect to status code 2, our May 11, 1998 tech support memo which in turn reprinted an article posted in a CompuServe Btrieve form circa 1995 still applies when troubleshooting that error code!)
In the days of Btrieve 5.x (16-bit engine) and prior, there was no built-in way to determine what a status code might mean. That continued to be the case with the 32-bit Btrieve 6.15. Starting with newer versions of Btrieve after 6.x (called now Pervasive), documentation started to be included that contained this information (in addition to on-line sources including the Pervasive web site), but it still requires some digging to find.
CD's shipped by Pervasive for example include reference libraries and PDF's that provide various levels of useful information including status code details. But, it is usually simplest to lookup the status code from Pervasive-installed programs.
So where do you find them?
It depends on the version in use. In the latest versions (10 and 11), they are available directly from the Pervasive Control Center under Help and then PSQL Documentation Libary, i.e.:
Pervasive --> PSQL 11 --> Control Center & Documentation --> Help
Once the PCC is loaded, click on Help then PSQL Documentation Library:
You can then search the status codes:
Absent a Windows program/start menu in Win 2012 Server and Win 8, search for Control Center in Win 2012 Server and Win 8). If you just search for Pervasive, you will not find it.
In earlier versions, such as version 9, they are available from the Function Executor utility provided by Pervasive (that end users typically will otherwise have no need for, and will not even be aware that it exists) which is nested deeply from the Windows programs menu:
Pervasive --> Pervasive.SQL --> Other utilities --> Function Executor -->Help
Click on Status Codes to proceed to investigate the error/status code.
Addsum web site and general info
Postings here will focus mainly on Advanced Accounting software updates, tips, and related topics. They will also include general comments relating to troubleshooting PC/Windows/network problems and may also include reference to our other software products and projects including any of our various utilities, or to the TAS Premier programming language. We considered setting up separate blogs for different topics so that users/others could subscribe to topics mostly aligned with their interests, but decided that it would be better to keep things simple since some topics cross over into others. We would nonetheless welcome your feedback/input in this regard. Our web site URL is www.addsuminc.com. Call us at 800-648-6258 or 801-277-9240. We also maintain www.advancedaccounting.us so that older Business Tools users in particular have a greater chance to find us.
We highly recommend that accounting software users "follow" this blog via e-mail (enter your address and click on Submit below) or subscribe to a feed (see also below) as a way to keep current on the latest updates and accounting software news and information. You may also want to whitelist this e-mail address: email@example.com.
Saturday, March 8, 2014
Thursday, March 6, 2014
A multi-user Advanced Accounting customer today reported that they could no longer "get into the software" following a power outage.
The user has a Pervasive client-server version on a system that we have long supported.
From a client PC, the user reported receiving a Pervasive 3106 status code. When we logged into a server (but not the “main” server” where the Pervasive engine is located) and running terminal services via remote desktop, we received a status code 3012 when trying to launch the accounting software, when it tried to open the first “Btrieve” data file which in this case was at the logon screen. (The software will initially launch without a Btrieve/Pervasive engine present since other files are first opened that do not require it.)
From the Pervasive documentation, causes of the 3106 and 3012 status codes are:
3106: The Pervasive Network Services Layer encountered a connection failure.
The Pervasive Network Services Layer was able to establish a transport connection at the client side, but the connection attempt at the target side failed.
One of the listed possible causes of a 3106 status code is:
The MicroKernel is not running on the server.
3012: Local engine is not accessible to the MicroKernel router.
Access to the local engine is not possible because it is not loaded or could not be launched. You can receive this status code if you try to access a local file on a client and you do not have a Workgroup engine installed or if you try to access a local file on a server and the Server engine is not running.
When the server re-booted following the power outage, the Pervasive service had failed to automatically start and was indeed not running. Normally, Pervasive services are set to automatically load on start up. The client Pervasive services were running (either the client PC's didn't lose power or they started up normally on re-boot) but the main server engine was not, and so the initial cause of the 3106 and 3012 was not as obvious as in a situation where no services or engine was available at all.
Restarting the Pervasive service on the server resolved the issue.
Postscipt: In October of 2017, a user reported a situation where a client PC in a Pervasive workstation engine configuration suddenly receiving a file error 3106 when trying to load Advanced Accounting across their network. Their troubleshooting revealed that a recent McAfee anti-virus update had blocked previously open ports causing the Pervasive engine to no longer be able to communicate with the gateway PC/server as before. Pervasive uses by default port 3351 for its transactional engine and port 1583 for SQL/ODBC access (these ports can be reconfigured but rarely are). In the case of Advanced Accounting, or any Btrieve-based software, if port 3351 is blocked then the Btrieve interface communications will be blocked.
Telnet can be used to determine if the server/gateway PC or local PC is listening on port 3351 as follows:
telnet computername 3351
where computername is the name of the server/gateway or the local PC. On each PC of interest:
will show what ports are listening. Because the output will scroll by quickly, scroll the file by either adding a more option:
netstat -an | more
or redirect the results to text and and view in notepad, e.g.:
netstat -an > results.txt
In the results of that command you should open ports such as:
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1583 0.0.0.0:0 LISTENING
TCP 0.0.0.0:3351 0.0.0.0:0 LISTENING