Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQl Server Instance labeled 'Suspect'

Posted on 2014-03-08
2
Medium Priority
?
525 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

688 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