2015-10-13 34 views
0

我需要將SQL Server 2008數據庫連接到服務器。沒有日誌文件,只是mdf文件不會啓動的SQL Server實例

經過一番挖掘,我發現這個How to recover database from MDF in SQL Server 2005? SO貼子。
所以我嘗試以下步驟:

  • 創建具有相同的名稱和MDF和LDF文件創建一個新的數據庫
  • 停止SQL Server
  • 與原

更換MDF文件當我下次嘗試啓動SQL Server時失敗。

現在變得更糟了,甚至無法啓動服務。我如何獲得服務回到任何想法?

Error Message when I tried to start the service

+1

我想你需要關心你的網絡管理員對於這一點,看到這pinal dave的修復答案,http://blog.sqlauthority.com/2011/03/29/sql-server-fix-error-the-request-failed-or-the-service-did-not-respond-in -timely-fashion-consult-the-event-log-or-other-applicable-error-logs-for-details/ – pedram

回答

0

你嘗試只是刪除文件?它會抱怨,但最有可能的工作..

順便說一句:當我想快速刪除一些日誌文件(從開發服務器)我只是分離有問題的數據庫,刪除LDF,然後再附加,刪除LDF在連接過程中不需要附加對話框。LDF並不是真正需要附加過程。

+0

問題SQL服務已停止,無法用SQL服務器啓動進行任何操作。 – sansalk

+0

轉到該文件所在的文件夾並將其刪除。爲什麼需要運行SQL Server服務? – Raj

+0

無需運行該服務即可刪除該文件。但仍然無法啓動SQL服務器。 – sansalk

0

終於讓我找到解決問題的方式遇到的問題可能有助於充分一些一個

1). Look at ERRORLOG on SQL folder 
2). Check any Windows Application Error Log 
3). Identified problem, and restart the SQL server Single user mode from command prompt (sqlservr.exe -m) [Help][1] 
4). Repeat 1). and 2). if you get any errors 
5). Remove the DB causing issues 
6). Restart the server with multi user mode 

問題已經解決