今天遇到一个问题:一个数据库suspect了。然后又被用户detach了。
1,尝试将数据库attach回去,因为log file损坏失败了。
2,尝试将数据库attach回去,同一时候rebuild log。因为数据库“The log cannot be rebuilt because the database was not cleanly shut down.”失败了。
提示有未完毕的transaction,no checkpoint。
鉴于attach数据库时仅提供了mdf,可推论这些信息存储在mdf中。
看大神怎样fix:
http://www.sqlskills.com/blogs/paul/creating-detaching-re-attaching-and-fixing-a-suspect-database/