sql server数据库被置疑解决方法(the sql server database is the solution to doubt)

sql server数据库被置疑解决方法(the sql server database is the solution to doubt)

ID:14684773

大小:33.50 KB

页数:13页

时间:2018-07-29

sql server数据库被置疑解决方法(the sql server database is the solution to doubt)_第1页
sql server数据库被置疑解决方法(the sql server database is the solution to doubt)_第2页
sql server数据库被置疑解决方法(the sql server database is the solution to doubt)_第3页
sql server数据库被置疑解决方法(the sql server database is the solution to doubt)_第4页
sql server数据库被置疑解决方法(the sql server database is the solution to doubt)_第5页
资源描述:

《sql server数据库被置疑解决方法(the sql server database is the solution to doubt)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、sqlserver数据库被置疑解决方法(TheSQLServerdatabaseisthesolutiontodoubt)First,makesurethatyouhavebackedupthe.Mdfand.Ldffiles.2.createadatabasewiththesamenameinSQLServer,andthenstoptheSQLServerservice.3.overwritethe.Mdfand.Ldffilesofthenewdatabasewiththeoriginal.Mdfand.Ld

2、ffiles.4.restarttheSQLServerservice,whichshouldseethedatabaseindoubt(Suspect)state.5.intheSQLqueryanalyzer,executethefollowingcommandtoallowupdatingofthesystemtables:UsemasterGoSp_configure'allowupdates',1ReconfigurewithoverrideGo6.placethisdatabaseasanemergen

3、cymode:Update,sysdatabases,set,status=32768,where,name='db_name'Go7.checktheerrorsinthedatabaseusingtheDBCCCHECKDBcommand:DBCCCHECKDB('db_name')GO8.iftheDBCCCHECKDBcommandfails,gotothetenthstep,oryouwillfirstsetthedatabaseinasingleusermode,andthentrytofixit:Sp

4、_dboption'db_name','singleuser','true'DBCCCHECKDB('db_name',REPAIR_ALLOW_DATA_LOSS)GOIftheDBCCCHECKDB("db_name","REPAIR_ALLOW_DATA_LOSS")commandispromptedtoindicatethatthedatabaseisnotinasingleusermode,restarttheSQLServerservice,andthenproceedwiththeattempt.9.

5、iftheDBCCCHECKDB('db_name',REPAIR_ALLOW_DATA_LOSS)commandfails,gotothetenthstep,otherwisethedatabaseerrorwillberepairedsuccessfully:ReruntheDBCCCHECKDB('db_name')commandtomakesuretherearenoerrorsinthedatabase.Clearthequerystatusofthedatabase:sp_resetstatus'db_

6、name'Clearthesingleusermodestateofthedatabase:sp_dboption'db_name','singleuser','false'RestarttheSQLServerserviceand,ifeverythingisOK,thedatabasehasbeensuccessfullyrestored.10.iftheabovestepsdonotsolvetheproblem,pleaserefertothedocumentintheattachedfileandtryt

7、orestorethedatainthedatabasebyrebuildingthetransactionlog.IfyouhaveonlyMDFfiles,theproblemismorecomplex,andweneedtorebuildthetransactionlogdirectly:1.createadatabasewiththesamenameinSQLServer,andthenstoptheSQLServerservice.2.overwritethenew.Mdffilewiththeorigi

8、nalLDFfileanddeletethelogfile(.Ldf).3.starttheSQLServerserviceandsetthedatabaseasanemergencymode(ibid.:steps5and6).4.stopandrestarttheSQLServerservice.5.performthefollowingcommands

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。