Overview
Database Console Command CHECKDB (DBCC CHECKDB) can be used to check the physical and logical integrity of objects in a SQL Server database.This command is good to run in case of database related issues are suspected and it is also good to run periodically to detect possible underlying corruption in the database files as this may remain undetected for long periods and thus affecting also backups.
This does not check any M-Files specific structures or data in the database.
Solution
The command checks the logical and physical integrity of all the database level objects in the specified database by performing the following operations:- Runs DBCC CHECKALLOC on the database.
- Runs DBCC CHECKTABLE on every table and view in the database.
- Runs DBCC CHECKCATALOG on the database.
- Validates the contents of every indexed view in the database.
- Validates link-level consistency between table metadata and file system directories and files when storing varbinary(max) data in the file system using FILESTREAM.
- Validates the Service Broker data in the database.
The following command can be run when the vault is online. However, never use any repair arguments allowing data loss, e.g. REPAIR_ALLOW_DATA_LOSS because in order to evaluate the consequences of possible data loss repairs the error report must be carefully analyzed before any repairs.
dbcc checkdb ('databasename');
DBCC report can be long, but at the end of the report should be a summary row like:
"CHECKDB found 0 allocation errors and 0 consistency errors in database 'databasename'."
In this example no errors were detected by CHECKDB command.
In case some errors exist, save the full results of the report and deliver the full report to M-Files Support for further analysis and recommendations. Never attempt any fixes to M-Files databases without consulting M-Files support.
