Overview
Why does my M-Files reporting database sometimes have duplicate tables, whose names start with an underscore? For example, the database might have tables "dbo.Document" and "dbo._Document" at the same time.
Solution
The tables whose names start with an underscore are temporary tables to which new data is written during an export, while keeping the previously exported data in the tables whose names do not start with an underscore. This makes sure that the previously exported data remains available for your reports while new data is being exported to the reporting database.
Once the data export finishes, the old tables are dropped and the ones whose names start with an underscore will be renamed so that the underscore is removed from the name.
These extra tables should be visible only when data export is running and they should not be used as data sources in reports, since they are only temporary tables.
For example:
- The data export starts by dropping table "_Document" (if it exists).
- Then it creates a new table called "_Document".
- Then it adds new data to "_Document".
- Then it drops the table called "Document" that holds the previously exported data.
- Then finally it renames table "_Document" to "Document", so the latest data becomes available for your reports.
For more information on M-Files Reporting module, please refer to this document:
