Click here to Skip to main content
16,016,580 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to repair current database using sql server 2008 and C#
Posted
Comments
Vedat Ozan Oner 14-Feb-14 8:30am    
are you designing a management software for sql-server? why do you need to do that with coding?
Artefakt94 14-Feb-14 8:33am    
http://stackoverflow.com/questions/4218960/how-to-restore-sql-server-database-through-c-sharp-code
Musakkhir 14-Feb-14 14:10pm    
I have to include one option in my application to repair the database if database is corrupted due to some reason.

DBCC CHECKDB('dbname')
 
Share this answer
 
DBCC CHECKDB is used to check the physical and logical integrity of the specified database. If it finds problem with the database then report error messages in the SQL server error log and suggests best repair options: repair_fast, repair_rebuild, repair_allow_data_loss to fix the corruption.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900