• Home
  • About
  • Services
    • Software Development
    • Website | Apps Development
    • Data Analytics | KPI Insights
    • Cloud Computing | DevOps
    • Blockchain | Metaverse
    • BPO | RCM | Medical Billing
  • Success Stories
  • Blog
  • Give Back
  • Contact
Address Louisville, KY 40223
Email contact@shazinfotech.com
Phone +1 (502) 615 0604
    • Home
    • About
    • Services
      • Software Development
      • Website | Apps Development
      • Data Analytics | KPI Insights
      • Cloud Computing | DevOps
      • Blockchain | Metaverse
      • BPO | RCM | Medical Billing
    • Success Stories
    • Blog
    • Give Back
    • Contact
SHAZ Technologies LLC
SHAZ Technologies LLC
  • Home
  • About
  • Services
    • Software Development
    • Website | Apps Development
    • Data Analytics | KPI Insights
    • Cloud Computing | DevOps
    • Blockchain | Metaverse
    • BPO | RCM | Medical Billing
  • Success Stories
  • Blog
  • Give Back
  • Contact

Import IIS Web Logs Files Into SQL

SHAZ Technologies LLC :Artifical Intelligence :Import IIS Web Logs Files Into SQL
  • January 21, 2021
  • SHAZ Technologies LLC
  • Artifical Intelligence, Web Development
  • 0

The Internet Information Services (IIS) web server provides a secure, easy-to-manage, modular, and extensible platform for reliably hosting websites, services, and applications. With IIS you can share information with users on the Internet, an intranet, or an extranet. IIS is a unified web platform that integrates IIS, ASP.NET, FTP services, PHP, and Windows Communication Foundation (WCF).

IIS web servers generate a massive amount of raw and unfiltered logs every day. IIS logs provide performance, operational, security, and business insights. With the help of these insights, development teams analyze various aspects of server and user activities, such as the time taken to complete a request, the total volume of data sent or received by the server, the HTTP status code to determine server response, and user behavior on a website.

We create PowerShell script that will 

1. Extract the log files in the /httplog folder (which I periodically FTP from the Production 

    environment) and subsequently move the processed files to the /httplog/archive folder

2. Import the log files using the LogParser utility.

3. Remove the log files from the /httplog folder (to avoid inserting duplicate data the 

    next time the script is run) and also hard-delete the processed files that are 21 days old

4. Parse “User-Agent” field to understand client device and browser details

5. Automate the PS script to run daily in Windows Task Scheduler

QuickstartsCourtesy Links
Turn on IIS Loggings (follow below screenshot)Windows > Internet Information Services (IIS) Manager
IIS W3C fields metadatahttps://docs.microsoft.com/en-us/windows/win32/http/w3c-logging
https://www.alibabacloud.com/help/en/doc-detail/84813.html
HTTP status/error code/deschttps://docs.microsoft.com/en-us/troubleshoot/iis/http-status-code
https://www.restapitutorial.com/httpstatuscodes.html
PrerequisiteDownload the “Log Parser .exe”https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=24659
Find this program at C:\ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Log Parser 2.2
Powershell script to import website (IIS) logs into SQL Server using Log Parser.You’ll need to update the log files path and connection string in PS script.ImportWebsiteLogFiles.ps1C:\
Create a table in SQL Server[dbo].[Project_WebLogs]
Automate the PS script to run dailyWindows > Task Scheduler
Online code inspirationhttps://jonlabelle.com/snippets/view/powershell/import-iis-web-logs-into-sql-using-powershell
Log Parser Studio (LPS) download for Adhoc/Self Service Reportinghttps://techcommunity.microsoft.com/t5/exchange-team-blog/introducing-log-parser-studio/ba-p/601131

Recent Posts

Install Free SSL Certification February 27, 2022
HTTP 413 Request Entity Too Large February 27, 2022
Adobe Embed API PDF Viewer February 27, 2022
Import IIS Web Logs Files Into SQL January 21, 2021

Categories

  • Artifical Intelligence
  • Web Development

Recent Comments

No comments to show.
SHAZ Technologies LLC
We embrace new challenges in cutting-edge technologies and provide forward-thinking software, solutions, and services for our customers to thrive in emerging markets and gain a competitive edge over rivals.

SERVICES

  • Software Development
  • Website & Apps Development
  • Data Analytics | BI
  • Cloud Computing & DevOps
  • Blockchain
  • BPO & Medical Billing

RESOURCES

  • Success Stories
  • Blog
  • Technology Stack
  • Giving Back To Community
  • FAQs
  • Free Consultation

CONTACT INFO

  • Louisville, KY 40223
  • +1 (502) 615 0640
  • contact@shazinfotech.com
  • https://shazinfotech.com/
  • 08:00am-06:00pm

© 2022 All Rights Reserved.

  • Home
  • About
  • Blog
  • FAQs