SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 SharePoint 2003 Database corrupt
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lomeco
Starting Member

8 Posts

Posted - 01/08/2011 :  10:03:37  Show Profile  Reply with Quote
Hi,
I had a SharePoint 2003 installation. After a disk crash, I could not get my SharePoint DB back online. The Server crashed, and I had to reinstall everything. Now I have a new SPS 2003 installation on a Win2003 Server/MSSQL 2005 Server. I am trying to get the old DataBase online. So far no success. The Errors are:
The DB is in single-user mode and shows always (emergency). I can
not see any tables. Or:
Msg 926, Level 14, State 1, Line 1
Database 'STS_mittelheim_1' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Msg 824, Level 24, State 2, Line 1
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:1022464; actual 0:0). It occurred during a read of page (1:1022464) in database ID 5 at offset 0x000001f3400000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\STS_mittelheim_1_Data.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe 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.
Msg 3414, Level 21, State 1, Line 1
An error occurred during recovery, preventing the database 'STS_mittelheim_1' (database ID 5) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.

Any help out there?
Thanks

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 01/08/2011 :  16:11:21  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
Restore from backup

It's likely repairable, but repairing sharepoint databases is tricky and can have odd effects on sharepoint.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/09/2011 :  15:44:11  Show Profile  Reply with Quote
That is the problem.

The backup is not up to date.
We need to repair it if possible.

thanks lomeco
Go to Top of Page

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 01/09/2011 :  15:59:07  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
How old is the backup?

Problem with repairing sharepoint is that it could cause severe problems with the site because the structure of the site is in the DB

Take the database into emergency mode and run a checkDB. DO NOT try and run any repair scripts yet.

ALTER DATABASE STS_mittelheim_1 SET EMERGENCY
DBCC CheckDB('STS_mittelheim_1') WITH NO_INFOMSGS, ALL_ERRORMSGS


Post the full and complete output of the checkDB.
DO NOT run any repair commands. DO NOT attempt to detach the database.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/10/2011 :  06:51:53  Show Profile  Reply with Quote
Hi GilaMonster,

this is the output of the sql command you sent me.

Msg 601, Level 12, State 3, Line 1
Could not continue scan with NOLOCK due to data movement.
Msg 824, Level 24, State 2, Line 2
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:840239; actual 0:0). It occurred during a read of page (1:840239) in database ID 5 at offset 0x0000019a45e000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\STS_mittelheim_1_Data.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe 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.

thanks

lomeco
Go to Top of Page

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 01/10/2011 :  07:44:15  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
What's the state of the database? (select name, state_desc from sys.databases)

How old is that backup you have and why is restoring it not an option?

--
Gail Shaw
SQL Server MVP

Edited by - GilaMonster on 01/10/2011 07:45:12
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/10/2011 :  13:27:39  Show Profile  Reply with Quote
Hi Gail,

backup is to old. The last full Backup is 2weeks old and when I tried to restore the db, it stopped in the middle of the restore with a bad tape error. The next full backup is 4 weeks older. I have stored some data in the SPS in the meantime which I need.

The status of the DB:
STS_mittelheim_1 EMERGENCY

regards
Lothar
Go to Top of Page

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 01/10/2011 :  14:33:16  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
Ok, try this one.
DBCC CheckDB('STS_mittelheim_1') WITH NO_INFOMSGS, ALL_ERRORMSGS, TABLOCK

If that doesn't work, I'll need to consult an expert.

I suspect you may be needing to change your backup strategy when/if you recover from this

--
Gail Shaw
SQL Server MVP
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/11/2011 :  14:07:34  Show Profile  Reply with Quote
Hi Gail,

this is the response:

Msg 824, Level 24, State 2, Line 1
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:840239; actual 0:0). It occurred during a read of page (1:840239) in database ID 5 at offset 0x0000019a45e000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\STS_mittelheim_1_Data.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe 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.


Kind Regards
Lothar
Go to Top of Page

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 01/11/2011 :  15:28:16  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
I have a feeling this is not repairable. Let me consult an expert.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

USA
899 Posts

Posted - 01/11/2011 :  15:35:47  Show Profile  Visit paulrandal's Homepage  Reply with Quote
Gail asked me to respond.

Is that the complete output from the DBCC CHECKDB command you ran?

If so, post the output from the following:

DBCC CHECKTABLE (4)
go
DBCC CHECKTABLE (5)
go
DBCC CHECKTABLE (7)
go
DBCC CHECKTABLE (13)
go
DBCC CHECKTABLE (15)
go

Thanks (I'll see your results as I subscribe to this forum)

Paul S. Randal,
CEO, SQLskills.com
Blog: www.SQLskills.com/blogs/paul Twitter: twitter.com/PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet and SQL Server Magazines
Author of SQL 2005 DBCC CHECKDB/repair code
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/13/2011 :  15:13:02  Show Profile  Reply with Quote
Hi Thanks for the reply,
I am not in the office right now. I will be back and will test your part on saturday morning

Thanks a lot
Lothar
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/15/2011 :  10:59:54  Show Profile  Reply with Quote
Hi Paul,

the responde of the commands are :

Msg 824, Level 24, State 2, Line 3
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:840239; actual 0:0). It occurred during a read of page (1:840239) in database ID 5 at offset 0x0000019a45e000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\STS_mittelheim_1_Data.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe 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.

Thanks for your help. I really appriciate your support. There are some important information inside the DB

Kind Regards

Lothar
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

USA
899 Posts

Posted - 01/15/2011 :  19:57:26  Show Profile  Visit paulrandal's Homepage  Reply with Quote
ok - you must restore from your backups or attempt to extract the data into a new database. There is no way to repair this.

Paul S. Randal,
CEO, SQLskills.com
Blog: www.SQLskills.com/blogs/paul Twitter: twitter.com/PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet and SQL Server Magazines
Author of SQL 2005 DBCC CHECKDB/repair code
Go to Top of Page

lomeco
Starting Member

8 Posts

Posted - 01/19/2011 :  14:30:45  Show Profile  Reply with Quote
Hi Paul,

first question how can I extract it to a new DB, and seconde what do you think about tools like Kernel for SQL DBs or SysTools for SQLDBs.
Or do you know a Software which I could use even if I have to buy it.

Kind Regards

Lothar
Go to Top of Page

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 01/19/2011 :  14:49:46  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
Most 3rd party database recovery tools are useless or worse than useless.

Extract - bit by bit, table by table, query the tables, filter on the clustered index column, tweak until you don't get errors. Given how sharepoint stores data, this is going to be difficult and you won't be able to just insert it into a new DB. You're easily looking at weeks of work

--
Gail Shaw
SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000