Browse FAQs

SQL Databases Marked 'Suspect'

Published date: 19 May 2020

Issue
SQL Databases are marked Suspect. The SQL error log contains "The log scan number () passed to log scan database is not valid"

Product
Struxureware Power Monitoring
Power Monitoring Expert
ION Enterprise
ION EEM

Environment
SQL Server 2005, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016

Cause
This is generally caused by a corrupt LDF file.

Resolution
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*

To correct, the databases can be rebuilt using the following script replacing DBName with the database name.

ALTER DATABASE DBName SET EMERGENCY
ALTER DATABASE [DBName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
go
USE MASTER
go
DBCC CHECKDB (DBName, REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS
go
EXEC sp_resetstatus DBName


** see attachment containing the SQL script text

Was this helpful?

What can we do to improve the information ?

Can't find what you are looking for?

Reach out to our customer care team to receive information on technical support, assistance for complaints and more.