2013-05-26 118 views
3

我正在爲學校項目製作網站。已下載的Visual Studio 2010(我們在學校中使用的版本),現在我試圖在上面運行我的網站。 SQL不會連接。我嘗試了我所知道的一切,沒有任何成效 當試圖在SQL Server Management Studio中連接時,它會給我的用戶「登錄失敗」。順便說一句,我正在嘗試Windows身份驗證試圖看着SQL錯誤日誌,並沒有任何!無法啓動SQL Server

我越來越沮喪,我在網上看到的每個回答都提到了真實的網站和我不明白的術語。我只是想讓我的數據庫工作!請幫助。

不知道該怎麼做。

編輯:好吧找到了日誌!這是在一個文件夾有點不同,然後提到。 我認爲這是問題: 編輯:嘗試了幾個建議的步驟。服務器現在(我認爲)處於單用戶模式。 仍然無法登錄,但不同的問題 - 這是日誌。

2013-05-26 19:14:03.97 Server  Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) 
    Jun 28 2012 08:36:30 
    Copyright (c) Microsoft Corporation 
    Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200:) 

2013-05-26 19:14:03.97 Server  (c) Microsoft Corporation. 
2013-05-26 19:14:03.97 Server  All rights reserved. 
2013-05-26 19:14:03.97 Server  Server process ID is 2968. 
2013-05-26 19:14:03.97 Server  Authentication mode is MIXED. 
2013-05-26 19:14:03.97 Server  Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Log\ERRORLOG'. 
2013-05-26 19:14:03.97 Server  This instance of SQL Server last reported using a process ID of 4068 at 26/05/2013 19:11:31 (local) 26/05/2013 16:11:31 (UTC). This is an informational message only; no user action is required. 
2013-05-26 19:14:03.97 Server  Registry startup parameters: 
    -d c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\master.mdf 
    -e c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Log\ERRORLOG 
    -l c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\mastlog.ldf 
    -m 
2013-05-26 19:14:03.99 Server  SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required. 
2013-05-26 19:14:03.99 Server  Detected 4 CPUs. This is an informational message; no user action is required. 
2013-05-26 19:14:04.00 Server  Perfmon counters for resource governor pools and groups failed to initialize and are disabled. 
2013-05-26 19:14:04.00 Server  Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required. 
2013-05-26 19:14:04.01 Server  Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required. 
2013-05-26 19:14:04.02 Server  Database Mirroring Transport is disabled in the endpoint configuration. 
2013-05-26 19:14:04.02 spid6s  Warning ****************** 
2013-05-26 19:14:04.02 spid6s  SQL Server started in single-user mode. This an informational message only. No user action is required. 
2013-05-26 19:14:04.02 spid6s  Starting up database 'master'. 
2013-05-26 19:14:04.10 spid6s  Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required. 
2013-05-26 19:14:04.14 spid6s  FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS'. 
2013-05-26 19:14:04.15 spid6s  SQL Trace ID 1 was started by login "sa". 
2013-05-26 19:14:04.15 spid6s  Starting up database 'mssqlsystemresource'. 
2013-05-26 19:14:04.19 spid6s  The resource database build version is 10.50.4000. This is an informational message only. No user action is required. 
2013-05-26 19:14:04.28 spid9s  Starting up database 'model'. 
2013-05-26 19:14:04.28 spid6s  Server name is 'NETA\SQLEXPRESS'. This is an informational message only. No user action is required. 
2013-05-26 19:14:04.28 spid6s  Informational: No full-text supported languages found. 
2013-05-26 19:14:04.28 spid6s  Starting up database 'msdb'. 
2013-05-26 19:14:04.39 Server  A self-generated certificate was successfully loaded for encryption. 
2013-05-26 19:14:04.39 Server  Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ]. 
2013-05-26 19:14:04.39 Server  Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ]. 
2013-05-26 19:14:04.39 Server  Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required. 
2013-05-26 19:14:04.39 Server  The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies. 
2013-05-26 19:14:04.39 Server  SQL Server is now ready for client connections. This is an informational message; no user action is required. 
2013-05-26 19:14:04.50 spid9s  Clearing tempdb database. 
2013-05-26 19:14:04.74 spid9s  Starting up database 'tempdb'. 
2013-05-26 19:14:04.80 spid6s  Recovery is complete. This is an informational message only. No user action is required. 
2013-05-26 19:14:14.60 Logon  Error: 18456, Severity: 14, State: 11. 
2013-05-26 19:14:14.60 Logon  Login failed for user 'Neta\Neta'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>] 
+0

日誌說什麼? – ProfessionalAmateur

+0

是的,我是管理員 – Neta

+0

請發佈您獲得的_exact_錯誤。另外,爲了仔細檢查,通過管理員你指的是SQL Server的權限,而不是Windows的權限? –

回答

0

那麼,在安裝Microsoft SQL Server之後,您需要重新啓動PC,然後確保它已正確添加到Windows服務中。嘗試運行「services.msc」並找到Microsoft SQL Server服務,檢查狀態以及是否被禁用 - >啓動它。

+0

試過了,結果還是一樣。 – Neta

1

也許你的sql服務器服務沒有啓動。試試這個...

去:控制面板 - >管理工具 - >服務

檢查這些服務是否已啓動:

  1. SQL全文篩選器守護程序啓動(MSSQLSERVER)
  2. 的SQL Server(MSSQLSERVER)
  3. SQL Server集成服務10.0
  4. SQL Server報表服務(MSSQLSERVER )
  5. SQL Server VSS編寫
 
after check that all, launch SQL Server Management Studio . 

you may connect to your server now with click on connect button: 
(server type: database engine, server name:. and authentication:windows authentication) 

in object explorer on left side by default you should see your server, if not, try click on "connect object explorer" then click on connect button.

我是可怕的延時抱歉,因爲我現在看到您的評論。我只是想,也許你有另一個使用你的MS SQL服務器端口的程序。例如ms sql server使用端口80,另一個程序/服務器如apache使用相同的端口。 如果每一個都在Windows登錄/啓動時開始啓動,則第一個程序將使用該端口,因此不允許其他端口使用該端口。 so!?如果您的問題仍然存在,您必須檢查80端口是否未被其他程序使用。

+0

實際上,我只有SQL Server和SQL Server VSS編寫器。 但我有3個不同的名稱,所以我認爲這些是缺少的3. 我的問題是,我無法與SQL Server Management Studio連接。 – Neta

+0

你知道......我認爲當你的系統上有多個實例作爲ms SQL服務器實例時......當你輸入服務器名時需要更加小心。如果你在你的系統上安裝了visual studio,並嘗試檢索服務器名稱,那麼你可以確保你的服務器名稱是否正確輸入。 –