Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

How do I repair SQL 2005 database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 75874
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic