Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQl Server Instance labeled 'Suspect'

Posted on 2014-03-08
2
Medium Priority
?
531 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 84

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

926 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