如何使用SQL Server 2008和C#修复数据库 [英] how to repair database using SQL server 2008 and C#

查看:110
本文介绍了如何使用SQL Server 2008和C#修复数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用sql server 2008修复当前数据库和C#

How to repair current database using sql server 2008 and C#

推荐答案

DBCC CHECKDB('dbname')


DBCC CHECKDB用于检查指定数据库的物理和逻辑完整性。如果它发现数据库有问题,则在SQL Server错误日志中报告错误消息,并建议最佳修复选项:repair_fast,repair_rebuild,repair_allow_data_loss以修复损坏。
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.


这篇关于如何使用SQL Server 2008和C#修复数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆