Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

SQL – Log Parser Studio

Posted on December 4, 2015December 4, 2015 By David Kittell

Log Parser Studio is a great free tool from Microsoft TechNet Gallery that allows you to run SQL statements against Log files.

This tool is available as a Zip file, once extracted open “LPS.exe”.

Load Log File(s)
Load Log File(s)

Two examples are below but there is also a category (Code – SQL – Log Parser Studio) for more detailed queries.

SELECT TOP 10 [LogFilename]
	,[c-ip]
	,[date]
	,[time]
	,[cs-uri-stem]
	,[time-taken]
	,[sc-status]
FROM '[LOGFILEPATH]'
SELECT TOP 25  
    STRCAT(TO_STRING(sc-status),  
    STRCAT('.', TO_STRING(sc-substatus))) As Status,  
    COUNT(*) AS Hits  
    FROM '[LOGFILEPATH]'  
GROUP BY Status  
ORDER BY Hits DESC 
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Log Parser Studio SQL

Post navigation

Previous post
Next post

Related Posts

WordPress – List All Plugins

Posted on September 22, 2015September 23, 2015

Place the following code on a file ex. ListAllPlugins.php and then navigate to http://yourdomain.com/ListAllPlugins.php <?PHP require($_SERVER[’DOCUMENT_ROOT’] . "/wp-load.php"); require($_SERVER[’DOCUMENT_ROOT’] . "/wp-admin/includes/plugin.php"); function PrintPluginList($option) { $all_plugins = get_plugins(); if ($option == 1) { print_r(array_values($all_plugins)); } else { echo json_encode($all_plugins); } } PrintPluginList($_GET[’op’]); ?> This is a PowerShell script to automate some…

Read More

PowerShell – Find a file

Posted on October 10, 2019

If you run into a need to find a file on your computer/server this script should help make things a bit easier Get-ChildItem -Path f:\ -Filter 2019-10-07.log -Recurse -ErrorAction SilentlyContinue -Force Function Format-FileSize() { Param ([int]$size) If ($size -gt 1TB) { [string]::Format("{0:0.00} TB", $size / 1TB) } ElseIf ($size -gt…

Read More

Mac OSX – Terminal – Read JSON From cURL

Posted on September 15, 2016September 15, 2016

Prerequisite: OSX Homebrew brew update brew prune brew install node brew upgrade node sudo curl -L https://npmjs.com/install.sh | sh npm update -g npm install -g json brew install python pip install pygments curl -s https://www.kittell.net/tools/jsonexample.php | json | pygmentize -l json curl -s –header "PRIVATE-TOKEN: <private token>" "http://127.0.0.1/api/v3/projects" | json…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes
 

Loading Comments...
 

You must be logged in to post a comment.