數據庫 'BPowercs' 的日誌不可用。有關相應錯誤消息,請查看事件日誌

[Err] 42000 - [SQL Server]ALTER DATABASE 語句失敗。

HY000 - [SQL Server]數據庫 'BPowercs' 的日誌不可用。有關相應錯誤消息,請查看事件日誌。修復所有錯誤後重新啓動數據庫。

解決辦法,運行如下語句:

use BPowercs 
go
alter database BPowercs
set recovery simple
go
dbcc shrinkfile(BPowercs_log,1)
go
alter database BPowercs
set recovery full
go

其中BPowercs 是數據庫名。

 

 

 

https://coding.imooc.com/class/267.html#Anchor 最近在看這個。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章