Solved

SQl Server Instance labeled 'Suspect'

Posted on 2014-03-08
2
508 Views
Last Modified: 2014-03-09
I dropped a database into my sql server data folder to run a proprietary application on (I do this routinely on other computers) but the application won't open.  I went into the SQL Server Management Studio and the database is listed as "Suspect".  How can I resolve this?

It's a Windows 7 machine.
0
Comment
Question by:Bob Schneider
2 Comments
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 39915321
Best option is to restore from a backup.  First off stop the SQL server services and copy your suspect database mdf and log ldf files

Sql Server <= 2005, detach and reattach and see if this resolves the issue.
From Sql Server Managment.. replace suspect with your actual values same goes for the path
EXEC sp_attach_db @dbname = 'Suspect',
    @filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Suspect.mdf',
    @filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Suspect_log.ldf';
GO

Open in new window


You will at least see if there are any error messages.
Lets see if the log file is damaged.. This will recreate a new log file
CREATE DATABASE [DemoSuspect] ON
    (NAME = Suspect',
    FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Suspect.mdf')
FOR ATTACH_REBUILD_LOG
GO

Open in new window


There are a few more steps i.e. Emergency mode... this is not for the faint of heart and doesn't guarantee all the data will be recovered and it is strictly a last resort option

http://www.sqlskills.com/blogs/paul/creating-detaching-re-attaching-and-fixing-a-suspect-database/
0
 

Author Closing Comment

by:Bob Schneider
ID: 39915774
Awesome help.  Thanks!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now