This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I repair SQL 2005 database

 
Ambrose Bennett
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a SQl 2005 Server that had a fan problem and went into continuous reboot for a time. I have replaced the fan, but now when I bring it up and start SQL services I have a few databases marked as suspect. I am not a DB person, and our DB person is out of office for a few weeks. How do I repair these DB's so I can get this running again.

Thanks.
 
Campbell Ritchie
Marshal
Posts: 53094
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You don't have a backup? I woud advise against trying to repair those databases yourself, unless they are very small and simple maybe.

Let' try duplicating this discussion in our databases forum.
 
Everett Austin
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After that -- only bring back the SQL Server Service -- and not the Server Agent.

https://www.repairtoolbox.com/sqlserverrepair.html - SQL Server Repair Toolbox
Check if the database(s) are still marked suspect. If they are

ALTER DATABASE [MyDBName]
SET EMERGENCY
GO
EXEC sp_resetstatus 'your_db_name';
GO
DBCC DBRECOVER ('your_db_name')
GO
ALTER DATABASE [MyDBName]
SET ONLINE
GO

If that doesn't work -- please post back and we can see what else we can do.

For more information about "sp_resetstatus" go to:
https://social.technet.microsoft.com/Forums/en-US/cc4cfcf8-93ad-4d8e-98db-9f241543da89/my-database-mdf-file-got-corrupted?forum=ssdsgetstarted
 
crick willi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Repair corrupt or damaged SQL database, I suggest an effective tool SQL Database recovery tool, with the help of this tool easy to recover corrupt or damaged SQL server database. It supports all versions of MS SQL server and Windows OS versions. Visit here - http://www.server.sqldatabaserecovery.org
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!