sql 2008,一次数据库服务意外停止并且启动后,发现有数据库不能打开,没有备份。
sql errorlog:Msg 5171, Level 16, State 1, Line 1
S:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\odb.mdf is not a primary database file.dbcc checkdb 不能运行。怎么办啊,解决后多少分都行!
sql errorlog:Msg 5171, Level 16, State 1, Line 1
S:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\odb.mdf is not a primary database file.dbcc checkdb 不能运行。怎么办啊,解决后多少分都行!
救命啊,大侠~~
按那个置疑的办法整整看。
参考:这个问题通常发生如果您的SQL Server的MDF文件得到了损坏。
密度板修复是可能的,被称为第三方应用的 SQL恢复软件的帮助。这些软件有助于在每一个中密度纤维板腐败的情况下,从而使你拥有完美的中密度纤维板恢复。
我查了查网上方法,现在问题:
DBCC CheckDB ('odb', REPAIR_ALLOW_DATA_LOSS) Msg 922, Level 14, State 1, Line 1
Database 'odb' is being recovered. Waiting until recovery is finished.然后按照方法:
Follow the following steps:
1 stop sql server
2 rename your db files or move them to another location
3 start sql server
4 remove the database from the list
5 create a new database with the same name and the same datafiles
6 set this database in emergency mode
7 stop sql server
8 copy your original db files back
9 start sql server还是不行