Esoteric

The inside scoop on SQL / debugging you won't find anywhere else!

Browse by Tags

Spread the word!
Tagged Content List
  • Blog Post: Normalizing T-SQL text, part 2: using the TransactSql.ScriptDom classes

    Happy New Year 2014 to all of you! With SQL Server 2014 set to release this year, I’m sure you are all excited about the months to come. In my previous post I had reviewed the classic ways of obtaining ‘normalized’ text for ad-hoc SQL queries. Do take a minute to glance at that post in case you have...
  • Blog Post: Normalizing T-SQL text, part 1: using the RML Utilities and the DMVs

    A common problem when dealing with workloads which issue ad-hoc SQL commands (i.e. without parameterization) is to find out the ‘normalized’ version of the pattern. For example, these three statements are essentially the same ‘template’: SELECT BusinessEntityId FROM Person.Person WHERE LastName = ‘Smith...
  • Blog Post: SQL PASS ScriptDom talk: Recording now available!

    The SQL PASS AppDev team has uploaded the recording of my session. You can click on the embedded player to view the HD recording. And if you have not looked at the slides and demos, please do review my previous post which refers to those!
  • Blog Post: Slides and samples for my SQL PASS ScriptDom talk

    Thank you very much, PASS AppDev for giving me the chance to share the capabilities and usage of the ScriptDom parser! The session was packed to capacity even before we got underway, something we did not quite expect given the specialized nature of the talk. Request : if you want to see an ‘encore’ or...
  • Blog Post: SQL PASS AppDev Virtual Chapter meeting

    I’ll be speaking about the SQL Server ScriptDom parser at the PASS AppDev Virtual Chapter meeting this Friday, 1st of November 2013. Here is the session abstract as published on the AppDev VC website : Session title : DIY: T-SQL Swiss Knife Using the ScriptDOM T-SQL Parser Abstract : Want to find out...
  • Blog Post: XML ‘Visualizer’ for the TransactSql.ScriptDom AST

    I’ve described the ScriptDom parser previously on this blog . The visitor pattern is great when you know exactly what you are looking for in the parse tree, but as you would have seen, due to the polymorphic nature of the ScriptDom classes, it is quite difficult for a truly generic tree walk when...
  • Blog Post: Using the TransactSql.ScriptDOM parser to get statement counts

    Today there was a question on the #sqlhelp Twitter hashtag: “Is it possible to get UPDATE/SELECT/INSERT/DELETE statement counts from SQL Server?” Implementation This is a perfect use case for the SQLDOM parser a.k.a. Microsoft.SqlServer.TransactSql.ScriptDom. I put together a sample C# application to...
  • Blog Post: Considerations when using the TransactSql.ScriptDOM parsers

    Some of you might be aware of the above namespace , which holds an implementation of a first-class T-SQL parser. In this post I would like to explain some of the complexity you will face when dealing with the ScriptDOM yourselves, typically using Visitor pattern. Case Study Our objective in this case...
  • Blog Post: T-SQL formatter: a PowerShell script

    This is a ‘quick-and-not-so-dirty’ version of a T-SQL formatter / ‘pretty printer’ in PowerShell. To use this, please install the SQL 2012 SP1 version of the SQLDOM from the Feature Pack page . (If you already have SQL 2012 client tools on your machine, you should be ready to go.) And you will need PowerShell...
Page 1 of 1 (9 items)