« Previous Next »

Thread: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

Last post 11-04-2008 12:51 PM by brinkcm. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 04-23-2008, 7:54 AM

    Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    I've published a LogParser Custom COM plugin input format which allows you to query any OLEDB datasource and use the LogParser engine to run queries against it.  Additionally allows you to query multiple datasources and I have implemented the native CheckPoint facility.

    EXE and VB.NET 2005 source from Gluegood blog

    Enjoy.

    e.g. Sample queries

    REM *** Excel ***
    LogParser.exe -i:COM "select * From 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\SOLVSAMP.XLS;Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1;\"'" -iProgId:Gluegood.LogParser.OLEDB -iCOMParams:iQuery="SELECT * FROM [Quick Tour$]" -o:DataGrid

    REM *** MS-SQL Multiple Connections ***
    LogParser.exe -i:COM "select * From 'Provider=SQLOLEDB;Server=SQLSERVER1;Database=DB1;Trusted_Connection=yes;', 'Provider=SQLOLEDB;Server=SQLSERVER2;Database=DB2;Trusted_Connection=yes;'" -iProgId:Gluegood.LogParser.OLEDB -iCOMParams:iQuery="Select * From Table",iCheckPoint="C:\CheckPointTest2.chk" -o:DataGrid

  • 07-30-2008, 9:07 AM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 7:17 AM
    • Johannesburg, South Africa
    • Posts 84

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

     Hey GG,

    Rock and roll!! Awesome plugin, thanks man. I was just playing with putting something like this together to address what I feel is one of the only shortcomings of LP when I came across your blog entry. 

    Cheers, Dave  

    Yes, dear
  • 07-30-2008, 12:18 PM In reply to

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    Yup, this is really sweet. What we should work on is a way fro logparser to unzip files in a log and then re-zip them after. I have a process that will zip log files from our servers and move to a central location and then I want to have logparser run through reading and taking care of the zip part...I assume many people do this same thing and have to manually unzip!

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
  • 08-12-2008, 9:45 AM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 7:17 AM
    • Johannesburg, South Africa
    • Posts 84

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    Hi There GG, 

     I am trying to do a join between 2 tables in a datasource and I obviously need to have some comma characters in my iQuery parameter. However, logparser seems to parse these commas as additional properties to pass to your plugin. 

    Have you come across this and do you know of a way to work around it? Please let me know as I want to use the plugin extensively. 

    Thanks for a great plugin. 

    Cheers, Dave 

    Yes, dear
  • 09-05-2008, 8:03 AM In reply to

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    Seems like a limitation within the iQuery e.g.

    LogParser.exe -i:COM "select * From 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\Northwind.mdb;'" -iProgId:Gluegood.LogParser.OLEDB -iCOMParams:iQuery="SELECT [EmployeeId],[LastName] FROM [Employees]" -o:DataGrid

    Doesn't seem to work.  Putting in [EmployeeId]\,[LastName] (LogParser thinks an additional parameter) or [EmployeeId] \u002C [LastName] (Query isn't recognised) doesn't seem to work either. 

    Think I'll have to make an enhancement to the component to support replacing Unicode character (e.g. \U002C) so you can put in commas.  I'll get a compile out shortly.

    Thanks

     

  • 09-05-2008, 1:38 PM In reply to

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    Thanks gg!

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
  • 09-06-2008, 3:36 AM In reply to

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    New version uploaded to the original site to support unicode characters in the iQuery.  Therefore can now execute in the iQuery with commas (replace , with \u002c). e.g.

    REM *** Access Single Connection with commas in iQuery ***
    LogParser.exe -i:COM "select * From 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\Northwind.mdb;'" -iProgId:Gluegood.LogParser.OLEDB -iCOMParams:iQuery="SELECT [EmployeeId]\u002c[LastName] FROM [Employees]" -o:DataGrid

    http://gluegood.blogspot.com/2008/04/freeware-logparseroledb.html

    Enjoy

     

     

  • 09-06-2008, 4:31 AM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 7:17 AM
    • Johannesburg, South Africa
    • Posts 84

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    Awesome, thanks GG. Cheers, Dave 

    Yes, dear
  • 11-04-2008, 12:51 PM In reply to

    • brinkcm
    • Not Ranked
    • Joined on 10-13-2008, 12:46 PM
    • Posts 10

    Re: Freeware Custom LogParser Input - OLEDB (e.g. query Excel, Access, MSSQL etc)

    For the sake of clarity, are commas the only characters not supported? ie, if I'm parsing a log using functions to manipulate strings based on backslashes, can I use '\\' or will I need to use unicode?

Page 1 of 1 (9 items)
Microsoft Communities