Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Database Corruption problems Expand / Collapse
Author
Message
Posted Friday, June 27, 2008 12:50 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, October 27, 2014 11:15 AM
Points: 2,041, Visits: 1,671
PSS won't be able to do anything different.

One of the steps of emergency mode repair is to try forcing recovery with the equivalent of WITH CONTINUE_AFTER_ERROR - looks like in this case it's caused the recovery code to hang. This is only the second time I've seen it fail since I wrote it - but it's a last ditch effort when everything's corrupt and there's no backup so I'm not surprised there are some cases where even it can't 'fix' things.

Your only options at this point are:
1 EMERGENCY mode and extract into a new database
2 delete the log file and run repair

#2 should only be attempted if you're comfortable. It's really ok as the log and database are corrupt anyway, so you're not losing anything by manually throwing away the transaction log. Follow these steps:
- shutdown
- make a complete copy of all database files on separate storage (in case you want to go back to your current state)
- delete the log file from the database
- start up
- put the database in emergency mode
- run repair - this won't try to run recovery this time, but will simply create a new log file and then run a full repair

Your data will be transactionally inconsistent and you'll have lost some but the database will be usable by SQL Server (not necessarily your application).

Do all of this at your own risk. The most important thing is to make a copy of all the database files before you start so you can go back to your current state.

Thanks


Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #525287
Posted Friday, June 27, 2008 1:26 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, February 22, 2013 1:36 PM
Points: 110, Visits: 429

Thanks Paul.

I had read about deleting the log file on another site. I just didn't have the guts to try it. Maybe I will give it a whirl. At this point I have nothing to lose.

Thanks

Quinn
Post #525307
Posted Wednesday, March 3, 2010 4:34 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, November 2, 2011 9:50 PM
Points: 189, Visits: 335
Hey Paul, If you won't beat your own drum I will

GO HERE !!!!

http://www.microsoft.com/emea/teched2008/itpro/tv/default.aspx?vid=78.

LEARN

Enjoy!

I did and have discovered the Power of DBCC page and Checkdb, and directly aided me recovering a large Database faster than a 4 hour restore.

Also I'd suggest you hunt up a copy of Rodney Landrum's eBook "SQL Server Tacklebox" especially the last chapter.

CodeOn




Post #876441
Posted Thursday, March 4, 2010 12:48 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, December 4, 2014 11:04 AM
Points: 739, Visits: 3,809
Malcolm Daughtree (3/3/2010)
Hey Paul, If you won't beat your own drum I will

GO HERE !!!!

http://www.microsoft.com/emea/teched2008/itpro/tv/default.aspx?vid=78.

LEARN

Enjoy!

I did and have discovered the Power of DBCC page and Checkdb, and directly aided me recovering a large Database faster than a 4 hour restore.

Also I'd suggest you hunt up a copy of Rodney Landrum's eBook "SQL Server Tacklebox" especially the last chapter.

CodeOn






Thanks Malcolm for pointing to a wonderful webcast of Paul explaining details of corruption with practical demos. I saw the whole and learned a lot.

Sometimes just reading forums regularly helps to gain knowledge !

\\K


______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor
Post #877106
Posted Thursday, March 4, 2010 1:32 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 5:39 AM
Points: 4,463, Visits: 6,391
Sometimes just reading forums regularly helps to gain knowledge !


Actually you didn't need to read this forum to gain knowledge. That stuff you watched has been on the web for a long time now.


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #877138
Posted Thursday, March 4, 2010 6:02 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, December 4, 2014 11:04 AM
Points: 739, Visits: 3,809
TheSQLGuru (3/4/2010)
Sometimes just reading forums regularly helps to gain knowledge !


Actually you didn't need to read this forum to gain knowledge. That stuff you watched has been on the web for a long time now.


I agree .. but sometimes the obvious remains obscure !

\\K


______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor
Post #877312
Posted Thursday, March 4, 2010 6:06 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, November 2, 2011 9:50 PM
Points: 189, Visits: 335
And sometimes the sign posts get lost..... all we can do is but try ...

Post #877317
Posted Saturday, April 14, 2012 5:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, April 14, 2012 4:59 AM
Points: 2, Visits: 6

Server reboot is not an easy job as it looks like. You should be very cautious while rebooting your SQL server because any minor mistake can corrupt your whole SQL database, i think the same happened with you and you had a list of corrupted and suspected files which you tried to fix with some coding but the problem is not resolved because these coding don't provide a proper solution. You need to have a commercial tool that can fix the errors of your corrupted SQL database.


You can get more information about the management tool from http://www.mssqlrepair.n.nu/repair-corrupt-ms-sql-database.html, it will help you to repair the corrupted files.


And one more thing I would like suggest you that please don't reboot your MS SQL Server incautiously next time.

Post #1283618
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse