all groups > sql server new users > october 2006 >
You're in the

sql server new users

group:

Database marked as "Suspect" . How to resolve this?


Database marked as "Suspect" . How to resolve this? Brandon
10/28/2006 9:47:03 PM
sql server new users:
We’ve got database marked as “suspect” in our MSSQL Server. We found out this
when viewing it using Enterprise Manager. We are ready to forsake the
unwritten transactions in the transaction log. Please tell us what we should
do so that we can bring the database marked as normal.

We tried to detach the “Suspect” database and got error. We restarted MSSQL
and those databases got detached successfully. But when we tried to attach
the database back to the MSSQL Server, we got the error screen. The error is
also Please tell us how we can attach the database back to MSSQL Server
Re: Database marked as "Suspect" . How to resolve this? Hilary Cotter
10/29/2006 12:00:00 AM
try
update sysdatabases
set status = status & ~256
where name = 'databasename'

or

update sysdatabases
set status = status | -32768
where name = 'databasename'

after this restart SQL Server and you should be able to access the database
to bcp the data out.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: Database marked as "Suspect" . How to resolve this? Hari Prasad
10/29/2006 9:35:47 AM
Hi,

In your case best solution will be to restore the latest database and
transaction log backup from the database backup folder; incase if you do not
have the backup then try attaching the database using
sp_attach_single_file_db [see books online for usage].

As a practice please do not detach the Suspect database. When ever there is
suspect verify the SQL Server log and identify the
cause for the issue. Based on the issue the solution will varry.

Thanks
Hari

[quoted text, click to view]

Re: Database marked as "Suspect" . How to resolve this? Brandon
10/29/2006 5:52:01 PM
Thanks Hari, try it out.

[quoted text, click to view]
Re: Database marked as "Suspect" . How to resolve this? Brandon
10/29/2006 5:53:01 PM
Thanks Hilary

[quoted text, click to view]
AddThis Social Bookmark Button