一、确定IIS日志的位置:
二、LogParser 下载地址:
三、导入本地,不用密码的方式:
注:如果希望导入目录下所有文件,下例改为:d:\iisLog\* 即可
LogParser.exe "SELECT * FROM 'd:\iisLog\u_ex211008.log' to tableName" -i:IISW3C -o:SQL -oConnString:"Driver={SQL Server};server=.\SQL2017;database=dbName;Integrated Security=SSPI" -createtable:ON
四、用账号密码
LogParser.exe "SELECT * FROM 'D:\iisLog\u_ex211008.log' to tableName" -i:IISW3C -o:SQL -oConnString:"Driver={SQL Server};server=.;database=dbName;" -username:dba -PASSWORD:dbadba -createtable:ON
参考文章:
https://www.cnblogs.com/gossip/p/4611617.html
https://www.cnblogs.com/challengesoflife/p/13620070.html
https://www.cnblogs.com/mdx86/p/6349324.html