我正在處理的項目爲您工作的每個SVN分支創建一個SQL Server數據庫的本地副本。我們在本地計算機上運行帶有高級服務的SQL Server 2008 Express來承載它。爲什麼我會看到「正在恢復」消息,以及如何預防它?
當我們創建一個新的分支時,構建腳本將創建一個帶有該分支ID的新數據庫,創建模式對象,並複製來自生產影子服務器的所選數據。
創建數據庫之後,它或本地計算機上的其他數據庫通常會進入「恢復」模式幾分鐘。幾次刷新後,它出現並很高興,但偶爾會回到「恢復中」模式。
數據庫以簡單恢復模式創建。文件名未指定,因此它使用文件的默認路徑。
加載數據後數據庫的大小爲〜400 megs。它運行在SQL Server 2005兼容模式下。
用於創建數據庫的命令是:
SQLCMD -S $(DBSERVER)-Q「IF NOT EXISTS(SELECT [名稱] FROM sysdatabases中WHERE [名稱] = '$(數據庫名)') BEGIN CREATE DATABASE [$(DBName)]; print'Created $(DBName)'; END「
...其中$(DBName)和$(DBServer)是MSBuild參數。
今天早上我收到了一個不錯的乾淨的日誌文件。當我打開電腦時,它會啓動所有五個數據庫。但是,其中兩個顯示交易正在向前和向後滾動。它只是試圖啓動所有五個數據庫。
2010-06-10 08:24:59.74 spid52 Starting up database 'ASPState'.
2010-06-10 08:24:59.82 spid52 Starting up database 'CommunityLibrary'.
2010-06-10 08:25:03.97 spid52 Starting up database 'DLG-R8441'.
2010-06-10 08:25:05.07 spid52 2 transactions rolled forward in database 'DLG-R8441' (6). This is an informational message only. No user action is required.
2010-06-10 08:25:05.14 spid52 0 transactions rolled back in database 'DLG-R8441' (6). This is an informational message only. No user action is required.
2010-06-10 08:25:05.14 spid52 Recovery is writing a checkpoint in database 'DLG-R8441' (6). This is an informational message only. No user action is required.
2010-06-10 08:25:11.23 spid52 Starting up database 'DLG-R8979'.
2010-06-10 08:25:12.31 spid36s Starting up database 'DLG-R8441'.
2010-06-10 08:25:13.17 spid52 2 transactions rolled forward in database 'DLG-R8979' (9). This is an informational message only. No user action is required.
2010-06-10 08:25:13.22 spid52 0 transactions rolled back in database 'DLG-R8979' (9). This is an informational message only. No user action is required.
2010-06-10 08:25:13.22 spid52 Recovery is writing a checkpoint in database 'DLG-R8979' (9). This is an informational message only. No user action is required.
2010-06-10 08:25:18.43 spid52 Starting up database 'Rls QA'.
2010-06-10 08:25:19.13 spid46s Starting up database 'DLG-R8979'.
2010-06-10 08:25:23.29 spid36s Starting up database 'DLG-R8441'.
2010-06-10 08:25:27.91 spid52 Starting up database 'ASPState'.
2010-06-10 08:25:29.80 spid41s Starting up database 'DLG-R8979'.
2010-06-10 08:25:31.22 spid52 Starting up database 'Rls QA'.
在這種情況下,它不停地嘗試,直到我在08關閉SQL Server,不斷啓動數據庫:48:19.72,22分鐘後。同時,我實際上可以在大部分時間使用數據庫。
在日誌文件中的最後一行有趣的是這...
2010-06-10 08:35:01.52 spid34s Recovery completed for database DLG-R8441 (database ID 6) in 1 second(s) (analysis 603 ms, redo 0 ms, undo 219 ms.) This is an informational message only. No user action is required.
你的問題是什麼? – 2010-06-03 22:41:25
爲什麼我看到「In Recovery」信息,以及如何防止它? 謝謝! – 2010-06-03 23:05:08
日誌在發生這種情況時說什麼? – 2010-06-03 23:25:46