1、工具Log Parser ,命令行把日志文件导入数据库:
logparser "SELECT *, TO_LOCALTIME(TO_TIMESTAMP(ADD(TO_STRING(date, 'yyyy-MM-dd '), TO_STRING(time, 'hh:mm:ss')),'yyyy-MM-dd hh:mm:ss')) AS RequestTime FROM 'G:\u_ex230627.log' to MyMVC_WebLog" -i:IISW3C -o:SQL -server:127.0.0.1 -database:Test -driver:"SQL Server" -username:sa -password:sa -createtable:ON