Hi,
I have SQL 2005 database in suspect state. By my opinion it is damaged because of hard disk error. I’m trying to set the database in such kind of state so, that I can read undamaged data from it.
First I was tried with EXECsp_resetstatus'PIS';
and I was got the following message:
The suspect flag on the database "PIS" is already reset.
Then I was tried to use DBCC checkdb('PIS')
but I was got the message:
Msg 926, Level 14, State 1, Line 1
Database 'PIS' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
Then I was tried to set database in emergency mode with AlterDatabase PIS SetEmergency
but I was got the following error again :
Msg 823, Level 24, State 2, Line 1
The operating system returned error 38(Dosežen je bil konec datoteke (EOF).) to SQL Server during a read at offset 0x0000000c0b8000 in file 'c:\DATA\DATA\MITIC1.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
The database is now not suspected but in the Management Studio I see just database without any database objects.
Likewise I was tried to move database to another SQL server so, that I was restore database from older backup on the another SQL server. Then I was stopped this server and original server then I was copied original files (I have 3 files and 1 log file) over new restored files and then I was started new SQL server. The database becomes suspected with all above problems.
Does anybody has ideas or tricks how to correct this database so, that I can read good data from it?
Regards