资源描述:
《数据库置疑处理方法(database questionable processing methods)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、数据库置疑处理方法(Databasequestionableprocessingmethods)Setthedatabasetoastateofemergency:Then,intheSQLqueryanalyzer,selectthemasterdatabaseandenterthefollowingstatementexecution(asingleexecution)Sp_configure'allow',1ReconfigurewithoverrideUpdatesysdatabasessetstatus=32768wherename
2、='hbposv6'2.Rebuildlogfile(pleasechangethepathtoyourdatafilepath)D:MSSQL$PRODDatatostorethepathofthedatabasefileTheKMJXC_log2.LDFisanewnonexistentfilethatwillbeautomaticallycreatedwhenthefollowingstatementisexecutedDbccrebuild_log('hbposv6','D:ProgramFilesMicrosoftSQLS
3、erverMSSQLDatahbposv6_log2LDF')3.Cancelemergencymode(oneexecution)Updatesysdatabasessetstatus=0wherename='hbposv6'Restoredatabasehbposv6withrecoverySp_configure'allow'0Reconfigurewithoverride4.RestartSQLserverSolution1:youcanfixitwiththefollowingcode:USEtheMASTERTheGOSP_
4、CONFIGURE'ALLOWUPDATES',1RECONFIGUREWITHOVERRIDETheGOUPDATESYSDATABASESSETSTATUS=32768WHERENAME='MSDB'TheGoSp_dboption'msdb','singleuser','true'TheGoDBCCCHECKDB('MSDB')TheGoUpdatesysdatabasessetstatus=28wherename='MSDB'TheGoSp_configure'allowupdates',0Reconfigurewithoverrid
5、eTheGoSp_dboption'MSDB','singleuser','false'TheGoSolution2:MSDBdatabaseresolutionprocessDifficultpoints:sincetheMSDBdatabasecannotbedeleted,thefilesarecopiedoutandthedatabaseisattachedagain,butthenewadditionaldatabasecannotbecalledMSDB,whichisnotthesamename,andhasencountere
6、ddifficulties.1:stoptheentiredatabaseandpastethefilemsdbdata.mdfandmsdblog.ldfintoanotherdirectory.2:copytheabovefilestoanotherdirectory,whichmeanscopytwice.3:selecttherightmouseofthedatabase-alltasks-theadditionaldatabasewillbeattachedtoacopyofthebackupfile,inwhichthedatab
7、asenameisMSDB1andtheuserisSAorADMINISTRATOR.4:backuptheMSDB1databaseandbackupitintoafile.MynamewasMSDB.BAK.5:selectthequestionabledatabaseMSDB,selecttherecoverydatabase,andrestorethedatabasethatwasjustbackeduptoMSDB.6:problemsolving,MSDBlibrarycanbeusedagain.Onceyou'redone,
8、makeaquickbackupofthedatabase.Haha.Additional:databasesuspectsolutionThefirsttimeI