Dynamics NAV Database Test

Our Sponsors

Please help us

The FAQ's on the Dynamics User Group are your pages. You ask the questions and the answers.

If there's an article/page which you think is wrong, then please just go ahead and edit the article/page (just click on the Edit tab - if you're logged in). Or if you don't want to edit the page, then you can just write a comment.

In many pages there are links to new pages that still needs to be created. You are very welcome to go ahead and start the page, with the information you think the page should contain.

And don't worry if it doesn't look perfect or if you make spelling errors because your English is not perfect. Another member will then be able to fix the article.

The FAQ is just like the Wikipedia's you know from other sites and is like that a work-in-progress that will never finish.

Page Details

Published by:
Erik P. Ernst
on 2011-4-27
2 people found this article useful.

100% of people found this useful
Dynamics NAV Database Test

To safeguard against errors, you should frequently check the integrity and consistency of your database. You do this from clients or single users.

Without opening the program

You can also test the database without opening the program. You start the test by setting the program property DB Test in target field or command line.

Example:

fin.exe servername=My Server, ntauthentication=yes, database=database.fdb, dbtest=normal

The possible settings for DB Test in the Target field are min., max. and normal. You can customize the database test if you start the test from within Dynamics NAV.

From within the program

To start the test from within the program, click File, Database, Test. The Test Database window appears.

You determine the extent of the test by selecting one of the four option buttons at the top of the window (such as Minimum). When you select an option, the individual tests included in that option are run.

The following table lists what the different tests involve:
Level Test Fields Features Checked
Minimum Test primary keys and data
Test BLOBs
All records in all tables can be read.
Records are sorted in ascending order according to the primary key.
All fields are correct in relation to the field type.
All BLOBs (fields for pictures – for example, on the item card) can be read.

Level Test Fields  Features Checked
Minimum Test Primary Keys and Data All records in all tables can be read.
Records are sorted in ascending order according to the primary key.
All fields are correct in relation to the field type.
Test BLOBs All BLOBs (fields for pictures – for example, on the item card) can be read.
Normal All the fields included in the Minimum test, plus:
Test secondary keys All secondary keys in all tables can be read.
Sorting is done correctly according to the secondary key.
All fields in the sorting have the correct field type.
Test space allocation All space in the database is either used by a sorting key or is available.
Maximum All the fields included in the Normal test, plus:

 

Test relationships between primary and secondary keys

The connection between the primary and secondary keys is correct.

 

Test field relationships between tables

All fields that have relationships to other fields can be accessed from the field to which they are related.

Custom

The same fields as in the Maximum test, but you can cancel the ones you don’t want to run.

Whatever you select.

Primary and secondary keys, mentioned in the previous table, are sometimes described as indexes and are used, for example, when you sort information. The keys determine how information in a table is ordered. You switch keys to sort information in a table in a different way. For example, you might want to sort your customers by name or by number.

How often you need to test the database depends on how secure the rest of the system (including the network) is and what level of security you need. It is a good idea, however, to test before you make a backup – especially if you don’t use the Dynamics
NAV backup function
.

Note: Test space allocation cannot be executed when there is more than one user on the system. If you select a test that includes it, Test space allocation will not be executed if there are other users on the system, but the rest of the test will be executed normally.

What if an error occurs?

If an error occurs, the program stops and displays an error message indicating what the error is and where it occurs.

The following steps must then be taken:

  1. Export a Dynamics NAV backup copy of the database.
  2. Create a new database, and restore the backup into it.
  3. Run a Maximum test on the new database to check it.
  4. If it is error-free, check to make sure that the company data is correct. Afterwards, you can continue to work in the new database.
  5. If this does not work, contact your Microsoft Dynamics NAV Partner for help.

Warning:  Never delete a corrupted database (one that contains an error) before a new, tested database has functioned without errors for a period of time.

Recent Comments

Leave the first comment for this page.