Network Management
Database SUSPECT Mode When REPAIR_ALLOW_DATA_LOSS Fails Due to MEMORY_OPTIMIZED_DATA Filegroup
This article provides an alternative resolution when the SolarWinds Platform database enters SUSPECT mode and the standard DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS fails with "Rebuilding log is not supported for databases containing files belonging to MEMORY_OPTIMIZED_DATA filegroup." Environment: SolarWinds Platform 2020.2 and later Microsoft SQL Server 2016 SP1 and later Database with MEMORY_OPTIMIZED_DATA filegroup (IN_MEM)
First published date
Last published date
Overview
Symptoms
-
The SolarWinds Platform database is in SUSPECT mode.
-
Restoring from backup and running
DBCC CHECKDBreturns consistency errors limited to specific tables. -
Attempting the standard repair path fails with:
Msg 41836: Rebuilding log is not supported for databases containing files belonging to MEMORY_OPTIMIZED_DATA filegroup.
Msg 7909: The emergency-mode repair failed. You must restore from backup.
Product section
Cause
The SolarWinds Platform database includes a MEMORY_OPTIMIZED_DATA filegroup (IN_MEM) created by default for the db.timeseries framework. This filegroup prevents SQL Server from rebuilding the transaction log during emergency-mode repair, which is a known Microsoft SQL Server limitation. The MEMORY_OPTIMIZED_DATA filegroup cannot be removed in SQL Server 2022 and older versions.
Resolution
NOTE: Database corruption is a SQL Server engine-level issue and is not caused by the SolarWinds application. The steps below are provided as a best-effort workaround. Ensure you have a full database backup and VM snapshot before proceeding. These steps should be performed by a qualified DBA. The following applies to each query below:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
Step 1: Identify the corrupted tables
Run DBCC CHECKDB against the database to identify which specific tables contain errors:
DBCC CHECKDB ('SolarWindsOrion') WITH NO_INFOMSGS, ALL_ERRORMSGS;
Review the output and note the table names listed in the summary lines, for example:
CHECKDB found 0 allocation errors and 6 consistency errors in table 'Wireless_Clients_CS_cur' (object ID 787734612).
CHECKDB found 0 allocation errors and 3 consistency errors in table 'InterfaceErrors_CS_cur' (object ID 799857107).
If the corruption is limited to specific tables (and no allocation errors are present), proceed with the steps below.
Step 2: Set the database to EMERGENCY mode
EXEC sp_resetstatus 'SolarWindsOrion';
ALTER DATABASE SolarWindsOrion SET EMERGENCY;
ALTER DATABASE SolarWindsOrion SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
Step 3: Drop the corrupted tables
Drop only the tables identified as corrupted in Step 1. For example:
DROP TABLE IF EXISTS dbo.Wireless_Clients_CS_cur;
DROP TABLE IF EXISTS dbo.InterfaceErrors_CS_cur;
DROP TABLE IF EXISTS dbo.InterfaceAvailability_CS_cur;
DROP TABLE IF EXISTS dbo.APM_ApplicationTemplate;
NOTE: Replace the table names above with the actual corrupted tables identified by
DBCC CHECKDBin your environment.
Step 4: Set the database back to MULTI_USER
ALTER DATABASE SolarWindsOrion SET MULTI_USER;
Step 5: Verify the database is clean
DBCC CHECKDB ('SolarWindsOrion') WITH NO_INFOMSGS, ALL_ERRORMSGS;
If CHECKDB returns zero errors, the database corruption is resolved. Proceed to Step 6.
If CHECKDB still reports errors, the corruption is more widespread. In that case, the last resort is to build a fresh database using the SolarWinds Configuration Wizard (historical polling data will be lost).
Step 6: Run the SolarWinds Configuration Wizard
Run the Configuration Wizard as administrator on the main polling engine. The Configuration Wizard will:
-
Recreate the dropped tables with the correct schema
-
Re-register CLR assemblies
-
Ensure all stored procedures and dependencies are up to date
Step 7: Verify platform functionality
After the Configuration Wizard completes:
-
Confirm the SolarWinds web console is accessible.
-
Verify that nodes are polling and data is being collected.
-
Check that alerts are functioning as expected.
Impact of Dropping Tables
|
Table Type |
Examples |
Impact |
|---|---|---|
|
Current Statistics tables ( |
|
Minimal — these tables repopulate automatically once polling resumes. No lasting data loss. |
|
Application template tables |
|
Medium — the Configuration Wizard recreates the table structure. Templates may need to be reassigned from the SAM built-in template library. |
|
Core configuration tables |
|
High — if core tables are corrupted, this workaround may not be viable. Consider a fresh database build instead. |