Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes 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
Sheriff
Posts: 51423
87
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic