Archive for month: May, 2012

SQL Server Query Execution Plan from Cache

29 May
May 29, 2012

There are many ways to obtain the execution plan of a SQL Server query, each of which serves a particular purpose, for example if you can run a query easily, then the best way to get an execution plan is to simply enable the execution plan (either through SSMS or SETting the correct session option), but if the query takes a long time to run, or you simply cannot run the query any other reason, then you might decide to profile the query when it is naturally running (perhaps on the live environment) through SQL Profiler.

In this post I will go through a simple SQL query to extract the execution plan from SQL’s own plan cache. There are many reasons why this might not be an accurate way to extract a query, but it is certainly helpful in situation were you have good understanding of your DB setup.

Read more →

SSIS 2012 Script Component Streaming Error (0xC0047020)

28 May
May 28, 2012

It has been a while since I released a post, this has mostly been due to a recent involvement in some very time consuming scale-out architecture, there is nothing like building a whole SQL Server architecture from scratch, something very powerful and enterprise-y.

Anyhow the purpose of this post is to discuss one of the many issuesam finding with the new SSIS 2012. This error relates to error logging when having a Script Component task within a Data Flow task that is being used as a data “Source”, particularly when this Script Component is followed by a Lookup task, or any task that works on results In-Stream, as shown in the image above.

Read more →