Solved

sql database suspect

Posted on 2007-11-16
9
1,187 Views
Last Modified: 2012-05-05
hi,
Our DB admin jst quit - evrything was workin fine so far up until this morning. The main database has a suspect next to it and i have no clue as to wut should be done and how can it be recovered. any help will be appreciated.
0
Comment
Question by:johny911
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
First step is start reading up on your disaster recovery plan, which should include location of all recent backups.
0
 
LVL 42

Accepted Solution

by:
EugeneZ earned 250 total points
Comment Utility
what is your sql server version\edition?

if it is 2000:
solution from:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_21439242.html?sfQueryTermInfo=1+eugenez+suspect

if sql server 2005:

--thanks to Bob Ward from Microsoft
-- Note that SSMS shows suspect_db SUSPECT
-- and this command will fail
--
use suspect_db
go
--
-- Let's go see what the ERRORLOG says before
-- we decide to just repair it
--
use master
go
alter database suspect_db set emergency
go
use suspect_db
go
--
-- CHECKDB is clean. Why suspect?
--
dbcc checkdb(suspect_db)
go
--
-- I've got a row in this table. Is that ok?
--
select * from mytab
go
--
-- Go ahead and repair it
--
use master
go
alter database suspect_db set single_user
go
dbcc checkdb(suspect_db, repair_allow_data_loss)
go
alter database suspect_db set multi_user
go

alter database suspect_db set online
go

0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
Second step you need to do and BEFORE you attempt to remedy anything is to determine the reason it became Suspect.  That includes looking at the SQL Server Error Logs and Windows Events.
0
 
LVL 31

Expert Comment

by:James Murrell
Comment Utility
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:johny911
Comment Utility
is there a step by step procedure that i can follow? i do know that the system was backed up last night -there is no disaster recovery program other than the backup.
0
 

Author Comment

by:johny911
Comment Utility
in the most recent SQL server logs it states 'by passin the recovery of the database cuz its marked suspect'
0
 

Author Comment

by:johny911
Comment Utility
"The LSN (261:507:1) passed to log scan in database 'database' is invalid.." - that is another error i found
0
 
LVL 31

Expert Comment

by:James Murrell
Comment Utility
0
 
LVL 3

Expert Comment

by:abhijit_k
Comment Utility
Use DBCC REBUILDLOG COMMAND
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

772 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

14 Experts available now in Live!

Get 1:1 Help Now