Upload
brandi-peplow
View
215
Download
1
Embed Size (px)
Citation preview
Who on Earth is Jonathan Allen?
Twitter.com/fatherjackTwitter.com/fatherjack
Who on Earth is Jonathan Allen? Local Government 13 years – accountancy/tax collection.
Systems engineer and DBA since 1999
SQL Server 6.5, 7, 2000, 2005 and 2008
Blog, Twitter, PASS Chapter leader - SQL South West
PASS UK Regional Mentor
LogParser in 60 minutes
• Download• Interface• Syntax• Some examples of LogParser in use• Common problems and how to deal with them• Help + support
Download
• Tiny application - 1Mb download!• From … http://
www.microsoft.com/download/en/details.aspx?displaylang=en&id=24659
http://j.mp/nCxRuP
LogParser environment
• Command line interface
• SQL like syntax to select data
• Some simple parameters to control output
• Only 4 data types – INT, STRING, REAL, TIMESTAMP
Jonathan Allen © - May 2011
Data types
• INT (64 bit)-2^63 through 2^63-1
• String
• Real±5.0*10-324 through ±1.7*10308
• Timestamp
• TinyInt, SmallInt, Int, BigInt
• VarChar
• Decimal/Float/Money
• Date/Time/DateTime
LogParser data type SQL Server data type
Help and support
• Great Help chm file included
• Good support on http://www.iis.net forum
Jonathan Allen © - May 2011
The Ins and Outs of LogParser
• ADS
• BIN
• COM
• CSV
• ETW
• EVT
• FS
• HTTPERR
• IIS
• IISODBC
• IISW3C
• NCSA
• NETMON
• REG
• TEXTLINE
• TEXTWORD
• TSV
• URLSCAN
• W3C
• XML
• CHART
• CSV
• DATAGRID
• IIS
• NAT
• SQL
• SYSLOG
• TPL
• TSV
• W3C
• XML
Input formats Output formats
LogParser modes
• Query Execution Mode (default)– Reads from Input and writes to Output
• Conversion Mode– Relates to working with W3C/IIS formats
• Defaults Override Mode– Used to change defaults to popular settings
• Help Mode– LOGPARSER -h
Common uses
• Rapid import of data from multiple files/sources/locations.
• Filtering, aggregation of data during import.
• Importing text data.• Monitoring of enterprise event logs.
Demo
LogParser Security considerations
• Source data connections are vulnerable• If a checkpoint file is used make sure it is
secure to prevent undesirable results by using ACL on secure network location.
• Usernames, passwords and data are sent in plain text by default so should be used advisedly over a network. Consider using ODBC.
Tips and tricks #01
Both * and % are wildcards – be carefulUse –fixcolnamesUse –queryinfo to diagnose issuesUse –h to get help …
Tips and tricks #02
Help: -h GRAMMAR : SQL Language Grammar
-h FUNCTIONS [ <function> ] : Functions Syntax
-h EXAMPLES : Example queries and commands
-h -i:<input_format> : Help on <input_format>
-h -o:<output_format> : Help on <output_format>
-h -c : Conversion help
E.g. LogParser -h -evt or LogParser -h functions
What now..?
• Next sessions Drinks and socialise
• Speak to exhibitors, if you haven't already.
• Speak to Community Corner about your local user group.
Jonathan Allen © - May 2011
Contact me• Blog – http://www.simple-talk.com/community/blogs/jonathanallen
• SQL forum moderator – http://ask.sqlservercentral.com
• Twitter - @Fatherjack
• SQLSouthWest PASS chapter – [email protected]
• Friend of Red Gate - http://www.red-gate.com
Europe’s Premier Community SQL Server Conference
Platinum Sponsor
Premium Sponsor
Silver, Bronze and Exhibitors
All of you…
Monday 3rd OctoberManchester - Manchester SQL Server User GroupBirmingham - SQL Midlands User Group Farnham - Surrey SQL Server User GroupAshford - Kent SQL Server and .NET User Group
Tuesday 4th OctoberLeeds - Leeds Area SQL Server User GroupLondon - London SQL Server User GroupBristol - SQL Server ClubHatfield - SQL Herts User GroupMaidenhead - Maidenhead SQL Server User Group
Wednesday 5th OctoberEdinburgh - Scottish Area SQL Server User GroupCardiff - Cardiff SQL Server User GroupExeter - SQL South West User GroupSouthampton - Southampton SQL Server User GroupCambridge - Cambridgeshire SQL Server User GroupBasildon - Essex SQL Server User Group
Thursday 6th OctoberLondon - UK SQL Server User Group
SQL Relay events
Another community days:
DDDNorth - Sunderland Saturday 8th October http://developerdeveloperdeveloper.com/north
DunDDD – Dundee Saturday 19th Novemberhttp://dundee.dddscotland.co.uk
Another slide Martin has slipped in without telling me!
Feedback
• Please complete your feedback and another chance to win the latest XBOX 360
• http://sqlbits.com/sqlbits9Thursday• http://sqlbits.com/sqlbits9Friday• http://sqlbits.com/sqlbits9Saturday• http://sqlbits.com/sqlbits9Feedback
On Next…
• Prize giving in the Exhibition Area
#SQLBITS
We hope you had a great conference!
Keep checking www.sqlbits.com for slide,
videos and news of the next conference
#SQLBITS
Thank you for coming
#SQLBITS