I read several forums questions related to SQL database corruption. As we all know, backup is the best way to repair SQL database. What a user will do when backup copy is also corrupted or updated bacjup is not available?

Is DBCC CHECKDB Repair option (Repair_Allow_Data_Loss) safe?

Have to answer no. There are many spam posts about these apps and all are just SPAM. As to your first question, this is how many learn that backup is not optional.

What part of allow data loss isn't clear is asked at https://blogs.msdn.microsoft.com/sqlserverstorageengine/2006/06/15/which-part-of-repair_allow_data_loss-isnt-clear/

My thought here is it's not OK at all. Again, this is a lesson on why backup is not optional. Only your newest to this issue will write this is not helpful. It is helpful in teaching the lesson which is "We only lose what we don't backup." There are also those spammers with promises but little else to offer. And then we have the shills and fake responders to what a glorious job these recovery apps did.

-> Only the new and foolish will be taken to the cleaners here.

PS. Forgot to add the following. Of course this is safe to try on a COPY of your database. Your surgeon didn't operate on live patients at first. Use that as your lesson about working on your last copy.

The REPAIR_ALLOW_DATA_LOSS option is a supported feature but it may not always be the best option for bringing a database to a physically consistent state. If successful, the REPAIR_ALLOW_DATA_LOSS option may result in some data loss. In fact, it may result in more data lost than if a user were to restore the database from the last known good backup.
Reference: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql?view=sql-server-2017

The REPAIR_ALLOW_DATA_LOSS option may result in some data loss. So, is it safe to use it?

As per microsoft's KB, data loss is possible with this option. I am asking about any other option to repair sql database without data loss.

@D. There are plenty of spammers that have touted their repair tools. Your question is answered already and only you know if your system allows data loss. I haven't read much from you about this or why you or your company decided to go without backups.

That is, if you and the company decided to go without then data loss must have been OK. The only way without loss is backups. Only the very new to this area disagree.

I agree with you, backup is the best way to get all the data back. fortunately, we repaired the data by manual ways.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.