When it comes to computer software applications, like QuickBooks, an assertion is a statement where a predicate, typically a true/false expression, is expected to always be true at a specific point in the software code.
Assertion Failure Mechanics
If an assertion evaluates to false at run time, an assertion failure occurs. Such a situation may cause the software application to crash or throw an assertion exception.
assertion failure
An assertion commonly is used to verify that an assumption made during the implementation of the program remains valid when the program is executed. In many cases, assertions are used to detect errors.
For example, if a specific field of data has a schema that is restrictive in some manner, an assertion might be used to verify that the schema is explicit and that erroneous data (contrary to the schema) is rejected from the application.
One major advantage of using assertions in this manner is error identification documentation, since any assertion failure helps to pinpoint the error location.
Sometimes QuickBooks might report an assertion failure message upon attempting to open a Company File or when running the Verify utility, as reported in the QBWin.log file.
QBWin assertion failure
In the format of the QBWin.log, the message rightfully appears far more complex and sinister than in my first example. We easily can find scary phrases like "Internal database error" and "Database validation failed," making assertion failures one of the most alarming forms of data corruption we've ever seen within our QuickBooks Company files.
It’s times like this that you find yourself saying, “Good thing we make an internal, fully-verified, backup of our QuickBooks Company file every evening at the end of the workday.”
Of course, all too often, you also might be telling yourself, “Why didn’t I follow Murph’s best practices and make an internal, fully-verified, backup of our QuickBooks Company file last night?”
If you're going to be in such a situation, the person stating the latter, rather than the former, may be looking for your salvation in the "arms of a QuickBooks data specialist" when it comes to your Company file.
But before you go shelling out big bucks for a professional file repair, you might want to remember our friend, in your QuickBooks Company file directory, QuickBooksAutoDataRecovery.
For six months or so, Intuit suspended Auto Data Recovery (ADR) while it did some work to make it better. It began pushing out updates that restored ADR to functionality over the past few months.
You won’t find the ADR file folder if you're running either QuickBooks Accountant or QuickBooks Enterprise-Accountant. Intuit turned off ADR in accountant versions. Too many accountants, bookkeepers and ProAdvisors who use these versions complained that too much of their "precious" hard drive space was being consumed by the extra data-sets contained in the ADR file folders.
But if your client is using Pro, Premier or Enterprise (non-accountant versions), the QBADR file folder should be in the same directory as your QuickBooks Company file.
At a couple of the recent Woodard Boot Camps this fall, I asked attendees if they had ever used the ADR feature. Not one had. Next, I asked if they even knew the ADR feature existed. Only a couple of attendees were aware of the feature, but had no idea how it worked or how to use it.
You can bet if ProAdvisors, and more advanced QuickBooks users, like those attending the Woodard Boot Camps are unaware of ADR, then the clear majority of day-to-day users are also unaware of the existence of this recovery option.
This is one case where"‘ignorance is not bliss."
Without knowing about ADR, the fundamental ability to rescue files may either go unused or become unusable, by virtue of the "time line" when someone recognizes the need for the feature.
It is my hope in writing this article that ProAdvisors become aware of this feature.
I wrote three articles about ADR in March of 2015, which you'll find in the list of related articles at the bottom of this page.
Let me summarize a few of the major points concerning ADR. The feature is designed to allow for recovery of damaged QuickBooks files. It makes use of two distinct Sybase technologies "auto replication," which creates a duplicate of your QuickBooks Company (.QBW) file and the QuickBooks Transaction Log (.QBW.tlg) file; and "auto recovery."
Intuit designed its Auto Data Recovery feature to help recover your QuickBooks data in one of two ways:
- Recreate lost transactions using the current QuickBooks Transaction Log (.QBW.tlg) file and a previous copy of the QuickBooks Company (.QBW) file
- Recreate all but the last few hours of transactions with a copy of both the QuickBooks Company (.QBW) file and of the QuickBooks Transaction Log (.QBW.tlg) file
The Auto Data Recovery feature uses the Sybase auto replication function to produce copies of the QuickBooks Company file and QuickBooks Transaction log files at regular intervals. These copies are stored in a special directory within the same Windows folder where your Company (.QBW) file is stored.
Approximately one hour after you open your QuickBooks company file, ADR makes a backup copy of your Company file and the TLG file. Every 12 hours after the first copy is made, another copy of your Company file and TLG file is made (if QuickBooks is open)
If QuickBooks is not open, the copies will be made the next time you start QuickBooks.
You now have two sets of your QuickBooks Company file and the corresponding TLG file. One of the sets is within 12 hours of your most current data and the second is within 24-hours (or so) of your most current data.
As the timeline progresses and a new set of data is created, the oldest set is deleted. Therefore, it's important to quickly determine if ADR is a potential solution for your data integrity problems.
Assertion Failures and the ADR Options
Assertion Failures, while programmatic in nature, impact the structural integrity of your data. The result is a compromise in your QuickBooks Company file. If a standard backup is not available for a time frame before the assertion failure corrupted the data, you may want to try to recover your data file back to a time prior to the corruption.
ADR offers two different capabilities that may help with this. I see no reason to go through the lengthy step-by-step procedures outlined in Part 2 and Part 3 of my three-part series. You will need to refer back to those steps as you proceed. I will, however, discuss each option specifically regarding their potential use with Assertion Failure caused file corruptions.
First, you can recreate lost transactions using the current QuickBooks Transaction Log (.QBW.tlg) file and a previous copy of the QuickBooks Company (.QBW) file. In other words, your current "live" TLG file is used to update a prior copy of the QBW file from the ADR file folder.
ADR Directory contents
There are a couple of problems with this option in relation to Assertion failures:
- You may not be able to determine which ADR copy of your company file data is free of the assertion failure
- The current “live” TLG file might contain the triggering event associated with the assertion failure
Note: You may want to try this option anyway after making a Windows copy of both your Company file and Transaction log file for safety purposes. If you decide to pursue this option, follow the steps outlined in Part 2 of my series on QuickBooks Auto Data Recovery.
The second ADR option is to recreate all but the last few hours of transactions with a copy of both the QuickBooks Company (.QBW) file and of the QuickBooks Transaction Log (.QBW.tlg) file.
ADR Data Sets
In my opinion, this option provides the most likely possibility for restoration of your QuickBooks Company file prior to the assertion failure. That's assuming you caught the corruption within the 12-hour (or 24-hour) ADR timeline. Obviously, this also will mean that some manual data recreation will be necessary.
I'd suggest you follow the steps for this type or restoration, starting with the 12-hour file first.
But prior to doing so, I think you should make a Windows "safety copy" of the entire QBADR directory and place it in some other location. You don't want QuickBooks attempting to create a new ADR file set and eliminating the oldest data set before you have the opportunity to restore it.
Now, proceed with the restoration the process found in Part 3 of my series on QuickBooks Auto Data Recovery.
If you find the initially restored file upon Verification contains the Assertion Failure, you'll want to try the same type or restoration using the older 24-hour data set. Hopefully you'll have caught your problem in time that you will not have to recreate more than the last 24-hours of data.
Conclusion
Assertion failure related data corruption poses a serious threat to your Company file.
You may be able to safely recover from this data integrity problem using a good backup you made as part of sound data safeguarding practices. Or, you may be able to use the QuickBooks Auto Data Recovery feature to restore your data to a point prior to the assertion failure.
If these options don’t work, then you need to contact a skilled QuickBooks ProAdvisor who specialized in data issues, Intuit’s Data Services technical support or a reputable professional data services company.
For ProAdvisors members of the Woodard Group, be sure to attend the Monthly Members Only Webinar, Nov. 4, 2016, where I'll be giving away one of my "special tricks" concerning Assertion Failure recovery I didn't cover in this article.