Home > Archive > MS SQL Server > July 2005 > Re: Please help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Please help
Hari Prasad

2005-07-28, 8:23 pm

Hi,

Suspect database may be due to below reasons.


1. MDF or LDF files may be used during the SQL Server service startup
2. LDF file might be corrupt or immediate power shutdown caused the LDF to
corrupt
3. MDF file - Page allocations issue

For the point 1.

Just Run sp_resetstatus <dbname> and restart SQL server service

For the point 2.

a. Start SQL Server in emergency mode

Setting the database status to emergency mode tells SQL Server to
skipautomatic recovery and lets you access the data.
To get your data, use this script:

Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768 where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO


You might be able to use bulk copy program (bcp), simple SELECT commands, or
use DTS to extract
your data while the database is in emergency mode. After this database will
be usable with out transaction log. AFter this
create a new database and use DTS to transfer objects and data

For point 3. Very critical error , try executing DBCC CHECKDB with
REPAIR_REBUILD
option. If the problem is not rectified try with restore from Backup or
contact Microsoft support.


Thanks
Hari
SQL Server MVP

"JIM.H." <JIMH@discussions.microsoft.com> wrote in message
news:A54AC7E4-535E-4083-A710- AC1205F1AB85@microso
ft.com...
> Hello,
>
> I do not see any data in my database through Enterprise manage. And its
> status became "suspect", what doe that mean? How can I resolve this
> problem?
> Thanks,
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com