今天處裡一個問題
由於刪除資料筆數過多 導致SQL SERVER卡住 並且無法退出資料庫
而且有損毀跡象
錯誤訊息
There is insufficient system memory in resource pool 'default' to run this query.
Msg 701, Level 17, State 84, Line 2
There is insufficient system memory in resource pool 'default' to run this query.
Msg 701, Level 17, State 84, Line 2
There is insufficient system memory in resource pool 'default' to run this query.
Msg 701, Level 17, State 107, Line 2
There is insufficient system memory in resource pool 'default' to run this query.
Msg 3314, Level 21, State 3, Line 2
During undoing of a logged operation in database ' XXX', an error occurred at log record ID (9640:332600:231). Typically, the specific failure is logged previously as an error in the operating system error log. Restore the database or file from a backup, or repair the database.
Msg 9001, Level 21, State 5, Line 2
The log for database 'FAC_Energy' is not available. Check theS operating system error log for related error messages. Resolve any errors and restart the database.
Msg 3314, Level 21, State 3, Line 2
During undoing of a logged operation in database 'XXX', an error occurred at log record ID (9686:264104:233). Typically, the specific failure is logged previously as an error in the operating system error log. Restore the database or file from a backup, or repair the database.
Msg 3314, Level 21, State 5, Line 2
During undoing of a logged operation in database 'XXX, an error occurred at log record ID (9480:135624:788). Typically, the specific failure is logged previously as an error in the operating system error log. Restore the database or file from a backup, or repair the database.
Msg 596, Level 21, State 1, Line 0
Cannot continue the execution because the session is in the kill state.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
由於我作業前有備份
因此排除方法
--Kick all users off of the database NOW
ALTER DATABASE <DatabaseName>
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
--刪除資料庫與檔案(注意!)
DROP Database <DatabaseName>
然後再還原資料庫
footer
See also :
留言