New version of the Database Check Tool for Microsoft Dynamics NAV

This article applies to Microsoft Dynamics NAV for all countries and all language locales.


The new Database Check Tool for Microsoft Dynamics NAV checks for inconsistencies between the Microsoft Dynamics NAV Object Metadata Snapshot table and SQL Server (CheckSnapshot) or checks and optionally correct invalid whitespace characters in code data types (FindInvalidCodeFields). You can use the tool for Microsoft Dynamics NAV 2013 R2 and later versions (such as, Microsoft Dynamics NAV 2015 and Microsoft Dynamics NAV 2016).

This tool replaces the earlier version released as hotfix KB2963997 .

NOTE Microsoft recommends you to take a backup of the target database before running the database checker tool.


When Microsoft Dynamics NAV applies changes to the table design in SQL Server; these changes are calculated based on the difference between the Object Metadata table, which is part of the Microsoft Dynamics NAV application database, and the Object Metadata Snapshot table, which is in the Microsoft Dynamics NAV tenant database. If the Object Metadata Snapshot table does not contain an accurate view of the actual table design in SQL Server, then Microsoft Dynamics NAV Server might not be able to apply changes to the design of that table and Microsoft Dynamics NAV cannot access the database.

If the tool reports a problem, there are different ways to resolve the issue. One option to resolve the issue is to manually align the table(s) in SQL Server with Microsoft Dynamics NAV metadata. For example, you can create the missing table, index, or field. The other option is to align Microsoft Dynamics NAV metadata with SQL Server. The way to do this is to make the changes in the Microsoft Dynamics NAV Development Environment so that the table fits the layout in SQL Server. Then run the following statement to update the snapshot:

declare @objectId int = 3
update [Object Metadata Snapshot] set Metadata = (select Metadata from [Object Metadata]
where [Object Type]=1 and [Object ID]=@objectId) where [Object Type] = 1 and [Object

Syntax to check the database
NavCheckDatabase CheckSnapshot [-Server] <string> [-Database] <string> [-AppDatabase] <string> 

Parameters description:

The name of the database server on which you want to run the command. To specify the local computer, specify ".".
Database: The name of the database that you want to check, such as DynamicsNAVDB.
AppDatabase: The name of the application database, such as MyAppDB.

If appdatabasename is not specified, then it is assumed that the application and the tenant database are the same (Legacy mode), for example:

NavCheckDatabase CheckSnapshot . DynamicsNAVDB  


The Database Check Tool has also the possibility of finding and correcting non-valid whitespace (as defined by the .NET Framework) on code fields of Microsoft Dynamics NAV databases. The tool traverses and reads all data and either counts, shows, or fixes existing code fields with whitespace in them.

If the tool reports a problem, you can also find which records contain whitespaces by setting the Extended parameter; when using it, it will also show the trimmed values of the records that contain the whitespaces.

If you want the tool to modify this data, set the –Modify parameter. If you set the Modify parameter, the tool will read all code data, find the records that contain whitespace and remove the whitespace at the beginning and end of the code values. Microsoft Dynamics NAV Server also uses these trimmed values when working with code fields.

NavCheckDatabase FindInvalidCodeFields [-Server] <string> [-Database] <string> [AppDatabase] <string> [-Extended] [-Modify]

Parameter Description:
Server: The name of the database server on which you want to run the command. To specify the local computer, specify ".".
Database: The name of the database that you want to check, such as DynamicsNAVDB.
AppDatabase: The name of the application database, such as MyAppDB.
Extended: Specifies if the result must return the trimmed records that have non-valid whitespaces.
Modify: Specifies if the tool must trim the values of code fields with whitespaces, and update them in the SQL Server database.

It is not recommended to use the appdatabasename when using FindInvalidCodeFields, for example:

NavCheckDatabase FindInvalidCodeField . DynamicsNAVDB

More Information

Hotfix information

A supported hotfix is available from Microsoft. There is a "Hotfix download available" section at the top of this Knowledge Base article. If you are encountering an issue downloading, installing this hotfix, or have other technical support questions, contact your partner or, if enrolled in a support plan directly with Microsoft, you can contact technical support for Microsoft Dynamics and create a new support request. To do this, visit the following Microsoft website: You can also contact technical support for Microsoft Dynamics by phone using these links for country specific phone numbers. To do this, visit one of the following Microsoft websites:

PartnersCustomersIn special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to any additional support questions and issues that do not qualify for the specific update in question.

How to obtain the Microsoft Dynamics NAV hotfix or update files

After you request a Microsoft Dynamics NAV hotfix, a hyperlink will be sent to you in an e-mail.

The e-mail will contain a hyperlink. You can use the hyperlink to download the Microsoft Dynamics NAV hotfix or the update files. When you click the hyperlink, the File Download – Security Warning dialog box opens. Then, you are prompted to run, to save, or to cancel the download.

If you click Run, the files start the download and the extraction process. You must specify a folder for the new files, and then provide the password.

If you click Save, you must specify a path for saving the compressed file. When you open the file that you saved, you are prompted to specify a path for the files.

If you click Cancel, the download process stops.


You must have Microsoft Dynamics NAV 2013 R2, Microsoft Dynamics NAV 2015, or Microsoft Dynamics NAV 2016 installed to apply this hotfix.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Artikel-id: 3125052 - Laatst bijgewerkt: 30 jan. 2017 - Revisie: 2