2013-05-29 77 views
0

我在Visual Studio 2010,Visual c#上有一個應用程序。我爲應用程序創建了一個數據庫,它用來運行得很好。但是今天當我運行我的應用程序時,數據庫無法正常工作。我刪除了.mdf文件,並試圖建立一個新的,但得到這個錯誤無法在Visual Studio中創建數據庫

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connection.(provider:SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

我不知道是什麼,以便能夠重新創建一個數據庫,因爲我不知道這樣做這首先發生在禁用它。

+1

確定數據庫實例正在運行嗎? –

+0

我該如何檢查? – Shevliaskovic

+0

在開始菜單中,找到SQL配置管理器 – KingCronus

回答

1

幾件事我能想到的...

  1. SQL Server installed/up and running

  2. 您是否已經有一個非用戶實例數據庫在SQL Server中命名爲相同的東西?

  3. 您的連接字符串設置是否正確?

+0

當我點擊SQL Server Services時,出現通話失敗的錯誤 – Shevliaskovic

+0

嘗試重新啓動計算機。在重新啓動修復它之前,我已經用SQL Server發生過時髦的事情。如果這不起作用,請通過進入「控制面板」並檢查「卸載程序」中的程序列表來檢查是否仍安裝SQL Server。可以卸載SQL Server,但所有其他工具仍然存在。您最近是否升級或更改權限? – Sam

+0

重新啓動計算的工作。但是發生了什麼? – Shevliaskovic

相關問題