Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback

Last updated on 13 May 2022 · 3 min read

Admin
Connections to External Databases (Integrated)

Overview

The error stack will look similar to the one below.  This is typically caused by a problem with the database search structure.
If you see texts related to replication in the error message, follow this article instead: Replication job fails with SQL Count Mismatch error.
Sample end lines of the call stack - some of the line numbers and the version at the end may vary. There will be more lines above these.

. . . .
RPCDocumentOperationsHelperPrivate.cpp, 5635, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
CachedDBSession.cpp, 766, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
CachedDBSession.cpp, 923, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
CachedDBSession.cpp, 977, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
CachedDBSession.cpp, 922, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
CachedDBSession.cpp, 1126, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
SQLHelper.cpp, 6978, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
CachedDBSession.cpp, 1124, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
MCommand.h, 682, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
MCommand.h, 879, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
MCommand.h, 681, Error 50000, Level 11, State 1, Procedure -, Line 1, Message: Count mismatch SQL error. [1] (ERROR: 50000, SQLSTATE: 42000) (0x80040E14)
(M-Files 22.4.11321.4 2022-04-14T11:29:48.740Z)


Solution


This is typically caused by a problem with the database search structure. This can be fixed with following way. Note that this takes the vault offline for a while, so you may need to plan this service break.
  1. In M-Files Admin expand the vault and go to Configurations > Advanced Vault Settings > Database > Verification.
  2. Add following JSON in the Advanced tab:
    {
      "repopulation": {
        "repopulatePropertyDefsSearchStructure": true
      }
    }
  3. Click Save.
  4. In the Configuration tab expand Repopulation and set
    'Force Repopulation During Verification': Yes
    'Take the Vault Offline': Yes
  5. Click Save.
  6. The settings should look like this: Graphical user interface, text, application, chat or text message  Description automatically generated
  7. Then run Verify & Repair (Quick) from M-Files Admin.
    NOTE This takes the vault offline, possibly for several hours, so it is recommended to complete this outside business hours.
  8. After above verify process is complete, then change above settings to 'No'.

If this does not resolve the issue, please contact Support (support@m-files.com) that the situation can be reviewed. Include the error report from the "Verify & Repair" run.

 

Still need help?

On this page