Re: Recover SQL Database from suspect status

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 05/24/04


Date: Mon, 24 May 2004 13:26:31 +0530

Hi,

Stop and start the SQL server and try accessing the webc database

use webc
go
select * from sysobjects

If it still gives the error then go thru the below informations:-

Details:-
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 (This you have done
already)

For the point 2. ( LDF file might be corrupt or immediate power shutdown
caused the LDF to corrupt)

a. Start SQL Server in emergency mode

    Setting the database status to emergency mode tells SQL Server to skip
automatic 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 = 'webc'
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
MCDBA

"Azkaban" <azkaban74@libero.it> wrote in message
news:uZL0MLWQEHA.556@tk2msftngp13.phx.gbl...
> Hi I'm trying to recover database from a suspect status but when I run
this
> command:
>
> sp_resetstatus webc
>
> sql return me this message:
>
> Prior to updating sysdatabases entry for database 'webc', mode = 0 and
> status = 1073741840 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made.
>
> What is it= What can I do to recover DB?
>
> Thanks.
>
> --
> ---------------------------------
> Filippo Macchi
>
>



Relevant Pages

  • Error 1813 or "WHY didnt they call me earlier?"
    ... 3- copy the data file (mdf and ndf's) over the ones from ... 4- start sql server ... >The SQL Server 7.0 database on this server appear after ... >but I get an error telling me that ldf file and mdf file ...
    (microsoft.public.sqlserver.server)
  • Re: Having a problem attaching a database
    ... SQL Server Storage Engine Development ... > having trouble attaching the database to pull the required information. ... Select the database that I want to attach (renamed file in new ... Click OK and a message appears asking if I want to create an ldf file. ...
    (microsoft.public.sqlserver.server)
  • Error 1813 or "WHY didnt they call me earlier?"
    ... I am sitting as second row SQL Server support. ... The SQL Server 7.0 database on this server appear after ... I have create the directory, and put the mdf file ... but I get an error telling me that ldf file and mdf file ...
    (microsoft.public.sqlserver.server)
  • Re: Missing log file...
    ... This will attach the database with MDF file and will create a new LDF file. ... Stop sql server and rename the existing MDF to a new one and copy the ...
    (microsoft.public.sqlserver.server)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)

Loading