question

Moz avatar image
Moz asked

Keeping a corrupt database on a SQL Server instance

Is it 'safe' for a corrupt database/table to remain on a SQL instance if not in anyway used? Are there any potential problems down the line? Thanks a lot, Moz
corruption
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
It depends. What is the core cause of the corruption? If it's strictly internal inconsistencies within a given database, then I'd say probably not. But, frequently (not always, or even necessarily a majority of the time) the corruption is actually an indicator that you have a bad controller or bad disks or some other hardware issue. In that case leaving the corrupt database in place isn't going to hurt you per se, but you're still waiting to be hurt. I suppose it's possible if you have a database with delinked or improperly linked pages that it could try to write to pages that are already in control of another database, but I'm pretty sure SQL Server & Windows would prevent that from happening. But, if the root cause of the corruption is something going wrong in the Windows OS, I wouldn't be at all surprised to see additional page splits and rearrangements leak out of the one database into others. I know of people who have left corrupt databases online for years without incident (well, if you don't count occasional data loss due to corruption as "without incident"). They didn't see it bleeding over onto other databases. It's still not something I would like to do if I can avoid it. Better to pay for some down time and get the system fixed than work with the Sword of Damocles hanging over your head.
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for the reply Grant. I appreciate the info. I think the point about the underlying cause still being an issue is spot on. The database is "parked" as it were and is not in use. Personally I would like to see it dropped.
1 Like 1 ·
It's a great question though. I've just been very risk averse when it comes to corruption, so I haven't had production systems with corruption on them for any length of time.
1 Like 1 ·
SmithSean avatar image
SmithSean answered

Agree with Grant Fritchey; I will recommend fixing the corruption as soon as possible. If you have a proper backup plan then, you can go on holiday :)

Well, I am also a DBA and always maintain the backup of the database. I follow Grant Fritchey's blog, and recently, I have read an article on SQL database corruption repair using SQL recovery software. He demonstrated amazingly and explained it effortlessly. see: https://www.scarydba.com/2020/09/23/review-stellar-repair-for-sql-server/

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.