{}

Our Brands

Impact-Company-Logo-English Black-01-177x54

Schneider Electric USA Website

Welcome to our website.

How can we help you today?

SQL Databases Marked 'Suspect'

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, SQL Server 2017, SQL Server 2019

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 before performing this procedure.*

To correct this, 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 the attachment containing the SQL script text

Schneider Electric USA

Attachment(s)

FA209810.sqlFA209810.sql [218 Bytes]
Explore more
Range:
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range: