→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎03-30-2015 05:00 PM
Solved! Go to Solution.
‎04-01-2015 10:48 AM
Select Top 1000000 tblNtlogSource.Sourcename As EventSource,
tblAssets.AssetID,
tblAssets.AssetName,
Case tblNtlog.Eventtype When 1 Then 'Error' When 2 Then 'Warning'
When 3 Then 'Information' When 4 Then 'Success Audit'
When 5 Then 'Failure Audit' End As Type,
tblNtlog.Eventcode,
tblNtlogMessage.Message,
Count(tblNtlog.EventlogID) As EventCount
From tblAssets
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where Case tblNtlog.Eventtype When 1 Then 'Error' When 2 Then 'Warning'
When 3 Then 'Information' When 4 Then 'Success Audit'
When 5 Then 'Failure Audit'
End In ('error', 'warning') And tblNtlog.TimeGenerated > GetDate() - 14 And
tblComputersystem.Domainrole > 1
Group By tblNtlogSource.Sourcename,
tblAssets.AssetID,
tblAssets.AssetName,
Case tblNtlog.Eventtype When 1 Then 'Error' When 2 Then 'Warning'
When 3 Then 'Information' When 4 Then 'Success Audit'
When 5 Then 'Failure Audit' End,
tblNtlog.Eventcode,
tblNtlogMessage.Message
Order By tblAssets.AssetName,
EventCount Desc
‎04-01-2015 10:48 AM
Select Top 1000000 tblNtlogSource.Sourcename As EventSource,
tblAssets.AssetID,
tblAssets.AssetName,
Case tblNtlog.Eventtype When 1 Then 'Error' When 2 Then 'Warning'
When 3 Then 'Information' When 4 Then 'Success Audit'
When 5 Then 'Failure Audit' End As Type,
tblNtlog.Eventcode,
tblNtlogMessage.Message,
Count(tblNtlog.EventlogID) As EventCount
From tblAssets
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where Case tblNtlog.Eventtype When 1 Then 'Error' When 2 Then 'Warning'
When 3 Then 'Information' When 4 Then 'Success Audit'
When 5 Then 'Failure Audit'
End In ('error', 'warning') And tblNtlog.TimeGenerated > GetDate() - 14 And
tblComputersystem.Domainrole > 1
Group By tblNtlogSource.Sourcename,
tblAssets.AssetID,
tblAssets.AssetName,
Case tblNtlog.Eventtype When 1 Then 'Error' When 2 Then 'Warning'
When 3 Then 'Information' When 4 Then 'Success Audit'
When 5 Then 'Failure Audit' End,
tblNtlog.Eventcode,
tblNtlogMessage.Message
Order By tblAssets.AssetName,
EventCount Desc
‎04-01-2015 09:14 AM
‎03-31-2015 07:28 PM
Select Top 1000000 tblNtlogSource.Sourcename As EventSource,
tblAssets.AssetID,
tblAssets.AssetName,
tblNtlog.Eventcode,
tblNtlogMessage.Message,
Count(tblNtlog.EventlogID) As EventCount
From tblAssets
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Where tblNtlog.TimeGenerated > GetDate() - 14
Group By tblNtlogSource.Sourcename,
tblAssets.AssetID,
tblAssets.AssetName,
tblNtlog.Eventcode,
tblNtlogMessage.Message
Order By tblAssets.AssetName,
EventCount Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now