日期:2014-05-18  浏览次数:20442 次

IISLOG文件第4列才是列名,而且前面有几个字符需要删除,怎么处理?
IIS 7.5的LOG文件格式如下:
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2010-09-07 00:55:15
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2010-09-07 00:55:15 127.0.0.1 GET /tips/2090185/4 - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 2 1941
2010-09-07 00:55:20 127.0.0.1 GET /tips/2090185/4 - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 2 1
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2010-09-07 08:14:37
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2010-09-07 08:14:37 127.0.0.1 GET /tips/874724605/4 - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 2 2827

可以看到第四列才是列名
可是前面#Fields: 是需要去掉的,但是在平面文件源设置里面只能指定哪行为列标题,但是不能对列进行处理?怎么办?

------解决方案--------------------
使用logparser先处理IIS日志,再运行SSIS导入到库中