‎03-29-2021 11:23 AM
Solved! Go to Solution.
‎04-06-2021 03:30 PM
DeviantTomato wrote:
Hello guys,
I am trying to add asset id in this script to see what computer is having chrashes most often, but it gives me an error every time.
Anyone willing to help?
Select Top (100000) tblCrash.CrashedApp,
Count(tblCrash.TimeGenerated) As CrashCount
From (Select SubString(tblNtlogMessage.Message, 28, CharIndex(',',
tblNtlogMessage.Message) - 28) As CrashedApp,
tblNtlog.TimeGenerated
From tblNtlog
Inner Join tblNtlogFile On tblNtlog.LogfileID = tblNtlogFile.LogfileID
Inner Join tblNtlogMessage On
tblNtlog.MessageID = tblNtlogMessage.MessageID
Inner Join tblNtlogSource On tblNtlog.SourcenameID =
tblNtlogSource.SourcenameID
Where tblNtlog.TimeGenerated > DateAdd(day, -14, GetDate()) And
tblNtlogSource.Sourcename = N'Application Error') As tblCrash
Group By tblCrash.CrashedApp
Order By CrashCount Desc
‎04-07-2021 10:57 AM
‎04-06-2021 03:30 PM
DeviantTomato wrote:
Hello guys,
I am trying to add asset id in this script to see what computer is having chrashes most often, but it gives me an error every time.
Anyone willing to help?
Select Top (100000) tblCrash.CrashedApp,
Count(tblCrash.TimeGenerated) As CrashCount
From (Select SubString(tblNtlogMessage.Message, 28, CharIndex(',',
tblNtlogMessage.Message) - 28) As CrashedApp,
tblNtlog.TimeGenerated
From tblNtlog
Inner Join tblNtlogFile On tblNtlog.LogfileID = tblNtlogFile.LogfileID
Inner Join tblNtlogMessage On
tblNtlog.MessageID = tblNtlogMessage.MessageID
Inner Join tblNtlogSource On tblNtlog.SourcenameID =
tblNtlogSource.SourcenameID
Where tblNtlog.TimeGenerated > DateAdd(day, -14, GetDate()) And
tblNtlogSource.Sourcename = N'Application Error') As tblCrash
Group By tblCrash.CrashedApp
Order By CrashCount Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now