Re: Recover SQL Database from suspect status
From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 05/24/04
- Next message: Hubert Mayr: "sqlserver 2000 - sqlserver.exe 100 percent cpu"
- Previous message: Uri Dimant: "Re: Preventing access to DataBase & encrypt meta-data and data of tables"
- In reply to: Azkaban: "Recover SQL Database from suspect status"
- Messages sorted by: [ date ] [ thread ]
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
>
>
- Next message: Hubert Mayr: "sqlserver 2000 - sqlserver.exe 100 percent cpu"
- Previous message: Uri Dimant: "Re: Preventing access to DataBase & encrypt meta-data and data of tables"
- In reply to: Azkaban: "Recover SQL Database from suspect status"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|