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

x
?
Solved

sql database suspect

Posted on 2007-11-16
9
Medium Priority
?
1,195 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
[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
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 75

Expert Comment

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

Accepted Solution

by:
Eugene Z earned 750 total points
ID: 20300116
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
ID: 20300193
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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 31

Expert Comment

by:James Murrell
ID: 20300197
0
 

Author Comment

by:johny911
ID: 20300297
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
ID: 20300321
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
ID: 20300367
"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
ID: 20300869
0
 
LVL 3

Expert Comment

by:abhijit_k
ID: 20334188
Use DBCC REBUILDLOG COMMAND
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
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.

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