Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Error 823: I/O Error (Torn Page) - Recovery

Author  Topic 

nabil
Starting Member

4 Posts

Posted - 2004-09-03 : 11:32:15
For some reason, OurDatabase became Suspect. After some troubleshooting, we could not access SQL server. Administrator reinstalled SQL server. the MDF and LOG files for the database are available. However, when we try to attach the database we receive teh followinr error:

ERROR 823: I/O error (Torn Page) detected during (read) at offset (0x00000015822000) in file 'OurDatabase'

I am desparate for help. I have done some research online. I am unable to do DBCC CHECKDB because the database is not attached. I am not that SQL savy.

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-09-03 : 11:41:07
Do you have Backup of the database?.

- Sekar
Go to Top of Page

nabil
Starting Member

4 Posts

Posted - 2004-09-03 : 11:50:52
I have a month-old backup. We were under the impression that the database was backed up daily. We were wrong. We just moved to a dedicated SQL server from a shared about a month ago. We would like to recover the recent data.
Go to Top of Page

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-09-03 : 12:05:37
HTH.. http://support.microsoft.com/default.aspx?scid=kb;en-us;828339

- Sekar
Go to Top of Page

nabil
Starting Member

4 Posts

Posted - 2004-09-03 : 13:54:51
Sekar,

Thank you. I have this article. I am unable to perform the DBCC CHECK DB because the database is not attached. as the article indicates, there may be a system issue or conflict. reason: I tried to restore the old back, and it would not allow it. I tried to restore the database from the same backup on another machine and it worked. Thank you for your help. Any other ideas would be greatly appreciated.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-09-03 : 18:37:57
Try to attach just the datafile using this:

EXEC sp_attach_single_file_db @dbname = 'pubs',
@physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf'


Rename the log file before you do this. Let us know if that works. If it doesn't, you might be looking at a call to PSS.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

nabil
Starting Member

4 Posts

Posted - 2004-09-03 : 19:01:01
MEanOldDBA,

Thank you for the advice. I renamed the log file. When I executed teh command, I received the following error:

Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'experts_com2'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'd:\Microsoft SQL Server\MSSQL\data\Experts_com_Log.LDF' may be incorrect.

For some reason, it continues to look for that log file. Is there any way to extract the data from the MDF file other than attaching it to Database?
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-09-03 : 22:44:26
Pose the command exactly like you used it.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -