2015年12月15日 星期二

無法開啟SQL Server Error Log

        今天在檢查某台SQL Server,在本機上透過SSMS要開啟Error Log,等了好久居然打不開?出現如下錯誤

An exception occurred while executing a Transect-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
A severe error occurred on the currentcommand. The results, if any, should be discarded



        Application Event Log有下面錯誤

The description for Event ID 17052 from source MSSQLSERVER cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Severity: 16 Error:10060, OS: 10060 [Microsoft][SQL Server Native Client 10.0]TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
the message resource is present but the message is not found in the string/message table


        執行xp_enumerrorlogs與xp_readerrorlog有下面錯誤

Msg 22004, Level 16, State 1, Line 0
Failed to open loopback connection. Please see event log for more information.
Msg 22004, Level 16, State 1, Line 0
error log location not found


        SQL Server Agent Error Logs有下面錯誤

[382] Logon to server 'Server-02' failed (ConnAttemptCachableOp)
[298] SQLServer Error: 10060, A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [SQLSTATE 08001]
[165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]
[298] SQLServer Error: 10060, TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. [SQLSTATE 08001]


        想說難道是Error Log太大,開不起來,可是才20多k而已

        直接用Notepad開Error Log正常

        倒是Agent Error Log很大,開Agent Error Log要十多秒才打得開,難道是這個影響,我直接
sp_cycle_agent_errorlog清理log後也一樣

        懷疑SSMS沒裝好,但用這台的連遠端正常,遠端連這台就不行,就是開Error Log不行,其他正常

        SQL服務與Agent啟動帳號也正常,權限足夠

        檢查Error Log路徑,與啟動服務的設定也一致

        Server名稱解析有問題嗎?Ping都正常,hosts也都有設定

        足足花了我半天還找不到問題,想說該不會要重灌吧,最後終於找到原因了,原來是
有錯誤的SQL Server alias設定,指向一個不存在的ip,修正後就正常了,真是非常蝦,當初不知是誰亂設的,浪費我好多時間              



0 意見:

張貼留言