SQL Server Error log

In Microsoft SQL Server there is a very handy way to read the error/runtime log using the xp_readerrorlog stored procedure.

 

Make sure you run this on your master database.  If you get a "(0 row(s) affected)" message it means no messages matched your query.  In the example below you are looking for messages containing "Server is listening on" in the message.  You can reduce the specificity (remove words / characters) to see more information from the log.

 

 

USE master

GO

xp_readerrorlog 0, 1, N'Server is listening on'

GO

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Categories: