Sql-Server-2005
SQL 數據庫還原失敗
我有連接到我的 sql server 2005 數據庫的 ac# 應用程序,我正在處理應用程序以在數據庫中插入一些條目,並且由於電源故障系統關閉,從那時起我收到此錯誤。我刷新數據庫,複製它,刪除它並嘗試再次附加它,因此發生錯誤。
The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
如果我在附加數據庫時使用日誌文件,我會收到此錯誤
The log scan number (1224:41:1) passed to log scan in database 'test' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
請幫忙謝謝
移動原始日誌文件後,嘗試使用 ATTACH_REBUILD_LOG 附加數據庫。