What is Correlation ID?
In SharePoint 2010, you get a Correlation ID (which is a GUID) attached to your logs/error messages when something happens. This ID can then be used to lookup that specific error from the logs.
It's very hectic that to check id in log files manually by going to each web server and searching log files.
The correlation ID is written to the end of each line in the trace log files, which are by default stored in
There are two ways of getting actual error for Correlation ID with out checking log files.
Method1 - Using Powershell command
get-splogevent | ?{$_Correlation -eq "<GUID>" } - replace guid with your id.
And you can customize the command to view only specific information.
get-splogevent | ?{$_.Correlation -eq "<GUID>"} | select Area, Category, Level, EventID, Message | Format-List
Method2 - Query DB ULSTraceLog
You can search the
Example
select [RowCreatedTime], [ProcessName], [Area],
[Category], EventID, [Message]
from [WSS_UsageApplication].[dbo].[ULSTraceLog] where CorrelationId= 'B4BBAC41-27C7-4B3A-AE33-4192B6C1E2C5'
In SharePoint 2010, you get a Correlation ID (which is a GUID) attached to your logs/error messages when something happens. This ID can then be used to lookup that specific error from the logs.
It's very hectic that to check id in log files manually by going to each web server and searching log files.
The correlation ID is written to the end of each line in the trace log files, which are by default stored in
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOG
There are two ways of getting actual error for Correlation ID with out checking log files.
Method1 - Using Powershell command
get-splogevent | ?{$_Correlation -eq "<GUID>" } - replace guid with your id.
And you can customize the command to view only specific information.
get-splogevent | ?{$_.Correlation -eq "<GUID>"} | select Area, Category, Level, EventID, Message | Format-List
Method2 - Query DB ULSTraceLog
You can search the
WSS_UsageApplication
database's ULSTraceLog
view, which has a separate field for the correlation ID.Example
select [RowCreatedTime], [ProcessName], [Area],
[Category], EventID, [Message]
from [WSS_UsageApplication].[dbo].[ULSTraceLog] where CorrelationId= 'B4BBAC41-27C7-4B3A-AE33-4192B6C1E2C5'
Hi Vamsi, Thanks for posting this informative article. Quick Question - I don't see WSS_UsageApplication Database in the SQL Server. What does it means? Where should I look for this DB?
ReplyDeleteThanks,
Khushi
Also, The PS command get-splogevent | ?{$_Correlation -eq "" } is also not responding. Any idea?
DeleteWe will have to provision the service application called - WSS_UsageApplication. You can get from Central Admin/Management Service Applications/WSS_UsageApplication. During provisoning the service application, you can provide the name of the database. In general the db name would be WSS_UsageApplication.
DeleteAny error while executing the command? the usage would be
Deleteget-splogevent | ?{$_Correlation -eq "" } - place correlation id beteween "". It will take some time to show based on the farm performace.