SQL Output Format Examples

Log Parser

SQL Output Format Examples

Upload Registry Values to a SQL table

Upload a portion of the registry into a newly-created SQL table:
LogParser "SELECT Path, KeyName, ValuleName INTO MyTable FROM \HKLM" -i:REG -o:SQL -server:MyServer -database:MyDatabase -driver:"SQL Server" -username:TestSQLUser -password:TestSQLPassword -createTable:ON

Upload IIS W3C log files to an Access database

Upload selected fields of an IIS W3C log file into an existing table in Microsoft Access:
LogParser "SELECT TO_TIMESTAMP(date, time), c-ip, cs-uri-stem, sc-status INTO MyTable FROM extend1.log" -i:IISW3C -o:SQL -oConnString:"Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\MyDB\MyDB.mdb;Uid=MyUsername;Pwd=MyPassword"


© 2004 Microsoft Corporation. All rights reserved.