saidapurs (4/24/2013)
Hi GilaMaster,Sorry, i have updated allocation error for my privies comment and consistency purpose below command can use..
use master
go
alter database DBname set single_user
GO
dbcc checkdb (DBname,repair_allow_data_loss)
GO
Regards
Satish
Sure you can, if you're happy with discarding who knows how much data from the database in the course of repair. The option is repair_allow_data_loss after all.
Repairing is the last resort in most cases, it's for when there's no clean backups, and so restoring from backup isn't an option.
When dealing with corruption, repair should be the last thing considered and only after careful analysis of what and how much data will be discarded as part of the repair. It should not ever be a knee-jerk reaction or done without careful consideration of the consequences.
p.s. if you read the thread, you'll notice that the OP did repair because he had no good backups.
Please read through this before you go recommending dangerous commands:
http://www.sqlservercentral.com/articles/Corruption/65804/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability