Friday, August 5, 2016

SCCM SQL Server vlogs

If we ever want to view the SQL logs to troubleshoot SCCM related issue, we can get information from SQL vlog.

To get top 1000 records from vlog;
SELECT TOP 1000 * FROM vLogs
NOTE: make sure you use top otherwise the SQL will get all the log entries and will cause perfomance issues.

To search vlogs log time in between days then ;
SELECT * FROM vLogs 
WHERE LogTime > '2016-07-25 12:00:00' and LogTime < '2016-07-26 12:00:00'
ORDER by LogTime desc

No comments:

Post a Comment