In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use Log Parser to save the IIS log to the database", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use Log Parser to save the IIS log to the database"!
Save the last hour's IISLog to the database in one hour.
@ echo OFF
SET LOGPASER= "C:\ Program Files (x86)\ Log Parser 2.2"
SET TimeNum=%time:~0,2%
Set / a TimeNum=%time:~0,2%-9
If TimeNum% LSS 0 (set / a TimeNum=%TimeNum%+24)
Set timvar= "TimeNum%"
If% TimeNum% LSS 10 (set timvar=0%TimeNum%)
If% TimeNum% GTR 10 (set timvar=timvar)
SET LOGFILE= "D:\ iisLog\ W3SVC1\ USTRAX% dateVAR% dateVAR% .log"
SET DB_SERVER= "10.10.9.XXX"
SET DB_DATABASE= "IISlog"
SET DB_Table= "Log"
SET DB_USERID= "sa"
SET DB_PASSWORD= "xxxxx"
Cd LOGPASER%
Logparser.exe "SELECT TO_LOCALTIME (TO_TIMESTAMP (TO_STRING (date, 'yyyy-MM-dd'), TO_STRING (time, 'hh:mm:ss')) AS CreateDate, * FROM% LOGFILE% to% DB_Table%"-i:IISW3C-o:SQL-oConnString: "Driver= {SQL Server}; server=%DB_SERVER%;database=%DB_DATABASE%;UId=%DB_USERID%;pwd=%DB_PASSWORD%;"-createtable:ON
Thank you for your reading, the above is "how to use Log Parser to save IIS logs to the database" content, after the study of this article, I believe you on how to use Log Parser to save IIS logs to the database this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.