<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Enjoy Another Sandwich -- Kent Tegels : Katmai</title><link>http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx</link><description>Tags: Katmai</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>HDC08 Omaha Demos Posted</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/10/17/9546.aspx</link><pubDate>Fri, 17 Oct 2008 20:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:9546</guid><dc:creator>ktegels</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/9546.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=9546</wfw:commentRss><description>Slides and demos for my hdc08omaha talks are now available for download from &lt;A href="http://tinyurl.com/5oykgj"&gt;http://tinyurl.com/5oykgj&lt;/A&gt; Thanks to all who attended!&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=9546" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/cache+transform/default.aspx">cache transform</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/GML/default.aspx">GML</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Heartland+Developers_2700_+Conference/default.aspx">Heartland Developers' Conference</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/lookup+component/default.aspx">lookup component</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Merge/default.aspx">Merge</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SqlGeometry/default.aspx">SqlGeometry</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SqlGeometryBuilder/default.aspx">SqlGeometryBuilder</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Looks like its time my 15-seconds of fame...</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/08/29/8649.aspx</link><pubDate>Fri, 29 Aug 2008 15:14:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8649</guid><dc:creator>ktegels</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8649.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8649</wfw:commentRss><description>&lt;P&gt;First up, my article Hierarchy ID has been published in MSDN Magazine. Its also available on the MSDN Web Site at &lt;A href="http://msdn.microsoft.com/en-us/magazine/cc794278.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/cc794278.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Second, my recent interview with Dr. Greg Low and his world famous "SQL Downunder Podcast" is now avaialbe at &lt;A href="http://www.sqldownunder.com/PreviousShows/tabid/98/Default.aspx"&gt;http://www.sqldownunder.com/PreviousShows/tabid/98/Default.aspx&lt;/A&gt;. In show #39, Greg and I talk about the Spatial features support in SQL Server 2008.&lt;/P&gt;
&lt;P&gt;Lastly, just a reminder that the Heartland Developers' Conferences (&lt;A href="http://www.heartlanddc.com/"&gt;http://www.heartlanddc.com/&lt;/A&gt;)&amp;nbsp;are just around the corner. There's going to be a lot of great content at these shows and I'm looking forward to them. I'll be giving a talk about the Spatial features in SQL Server 2008.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8649" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Heartland+Developers_2700_+Conference/default.aspx">Heartland Developers' Conference</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/HierarchyID/default.aspx">HierarchyID</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SQLDownunder/default.aspx">SQLDownunder</category></item><item><title>RDL me this - how do you write reports if all you have is SQL Server Express Advanced Services Edition?</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/08/26/8591.aspx</link><pubDate>Tue, 26 Aug 2008 22:04:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8591</guid><dc:creator>ktegels</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8591.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8591</wfw:commentRss><description>A few days ago via Twitter (&lt;A href="http://www.twitter.com/"&gt;http://www.twitter.com/&lt;/A&gt;, follow me as ktegels), Mr. Lowe (AKA Vendoran) asked "SQL Express with Advanced services comes with SSRS, but does it come with the ability to create/edit rdl in VS?" 
&lt;P&gt;The short answer to that question is "it depends." In most of the pay-for-license editions of Visual Studio you can use the Report Viewer controls to do that. For example, you can create a new C# Windows Forms project, then drag and drop a Report Viewer control on the form. After you have created the report you want, you will find an "RDLC" file in that project. RDLCs are, essentially, RDL files designed for use with the Report Viewer control. The good news is that these can be used Report Manager in most cases if you: a.) rename the file with an extension of RDL instead of RLDC before uploading and b.) reconfigure the connection string used by that report to a shared connection defined within Report Manager. However, the Expression Version of Visual Studio does not support this. True, you can look for, enable and use the Report Viewer control, but you will not be able to design a report in the Express SKU.&lt;/P&gt;
&lt;P&gt;So what to do, what to do? Your best bet today is download and install the Report Builder 2.0 tool. Robert Bruckner, a member of the SQL Server team specializing in Express/Advanced Services edition, has a blog post (&lt;A href="http://blogs.msdn.com/robertbruckner/archive/2008/08/25/ReportBuilder-20-RC1-Release.aspx"&gt;http://blogs.msdn.com/robertbruckner/archive/2008/08/25/ReportBuilder-20-RC1-Release.aspx&lt;/A&gt; ) about this tool and a download link. I tried this new tool today. It feels very much like the Report Designer in SSRS2008 - a good thing indeed. When you save a designed report, you get an RDL file.&amp;nbsp; Based on what Mr. Bruckner says in blog, I believe this tool has been target to help solve the riddle at hand.&lt;/P&gt;
&lt;P&gt;I am currently building a VPC with SQL Server 2008 Express Edition with Advanced Services to see if some version of this tool is included with it. If so, it looks like we have a good solution for low-cost reporting in hand.&lt;/P&gt;
&lt;P&gt;By the way, if you are using the new AdventureWorks2008 OLTP database, you might want to check out&amp;nbsp; &amp;nbsp;this "issue" (&lt;A href="http://www.codeplex.com/MSFTDBProdSamples/WorkItem/View.aspx?WorkItemId=7427"&gt;http://www.codeplex.com/MSFTDBProdSamples/WorkItem/View.aspx?WorkItemId=7427&lt;/A&gt;) I found with "[HumanResources].[vEmployeeDepartment] .Your votes would be appreciated. &lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8591" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/AdventureWorks/default.aspx">AdventureWorks</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Express+Edition+Advanced+Services/default.aspx">Express Edition Advanced Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Report+Builder/default.aspx">Report Builder</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSRS+2008/default.aspx">SSRS 2008</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Twitter/default.aspx">Twitter</category></item><item><title>The Top Five New Features in SSIS 2008 for Developers, Part 2</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/08/26/8570.aspx</link><pubDate>Tue, 26 Aug 2008 12:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8570</guid><dc:creator>ktegels</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8570.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8570</wfw:commentRss><description>&lt;P&gt;Lookup. For many SQL Server Integration Services Developers, it's the transformation we most love to dislike - especially if you are using it against data living on remote server not on the same local network as the host running your package. This combination of circumstances sometimes drives us to some very inventive things. In this post I want to look at a situation I ran into a few months ago, how I addressed that situation with SSIS90 and how SSIS100 improves on that.&lt;/P&gt;
&lt;P&gt;For the sake of keeping things simple, let us start with a scenario. You have a list of 5,000 email addresses in an XML file. You need do a look-up of those email address and get the person's name and mailing address. You will write that to a CSV file. This is trivial task using SSIS. Where SSIS90 runs into a problem is when the server you are performing the look-up against is on the far-end of a network connection. Following the best practices of SSIS development, supposed your look-up task was based on a SQL statement that specified only the columns of interest. However, what do you do about the rows of interest? In SSIS90, there is not much you can actually do easily. &lt;/P&gt;
&lt;P&gt;Remember that unless you use a memory restriction, SSIS90 fully populates the look-up cache with all of the records in the look-up query before processing. That is a double-edge sword: it definitely increases the "wait time" before a data flow task starts processing records. This is especially true if you are pulling data from a remote source with a slow network connection. Yet, the once the data flow starts, the records are processed at blistering speeds. &lt;/P&gt;
&lt;P&gt;A straightforward solution to this situation is to use SSIS's ability to serialize buffers to a file - also known as RAW files. In this case, an initial streaming of the lookup data in made into a RAW file. That RAW file is then used as a data source in a second package. The RAW file is "join merged" with the XML source. This effectively provides the same functionality as the look-up did in the previous package. Take care not assume that the RAW file will have all of the needed information - after all, people can move and new email addresses could be added at any time. Therefore, you should when you are designing the package, you should handle unmatched records using the lookup transformation. In addition, you should update the RAW file with the updated data. &lt;/P&gt;
&lt;P&gt;In SSIS100, the idea is fundamentally the same, but the tasks are slightly different. The problem being addressed is that there is no obvious way to serialize a look-up cache to a file (aside from the aforementioned technique that may not be at all obvious.) Neither is using a "merge join" as a way of doing a "look-up." The SSIS team has added a new transformation - the Cache Transform -- and modified another - the look-up - to make it more obvious how to serialize the cache.&lt;/P&gt;
&lt;P&gt;The Cache Transform component itself is simple enough: within a given Data Flow, you connect this component to a path and it writes the buffers from that path to a new version of the raw-file format know as a Cache-Raw file (or CAW, its file extension.) Like a normal RAW file, the output contains the binary version of the data. It also contains an index covering one or more of the columns. This indexing helps the look-up component efficiently use the cached data. When using this to solve our slow data problem we would run a one-time process to initialize the cache from a data source.&lt;/P&gt;
&lt;P&gt;The Look-up component in SSIS100 is expanded to accommodate using the Cache-Raw file. As before, this component can be configured to use an OLE-DB data source. However, it can also be configured to use a Cache-Raw file instead. This can dramatically improve the performance of data flow since it eliminates the start-up delay in acquiring the data. However, there is still the possibility that they cached data may be stale or missing desired matches. Another new feature in the SSIS100 look-up is the ability to direct rows that were not found in the look-up to a new data path. You could "kind of" do this in SSIS90 if you assume that the only row-level error was a failure to find a match. In the new design, rows not matching from the Cache-Raw file could be redirected to another look-up configured to read recently updated data from the remote database.&lt;/P&gt;
&lt;P&gt;One thing to keep in mind about the new look-up transform is that it does not seem to maintain the Cache-Raw file automatically. What you should do is re-direct the no-match rows to a traditional look-up. As your complete processing in the data flow, add a second Cache Transform that writes the union of the matched rows and the not-matched but by then looked-up rows. You will need to name that CAW file something other than what you used as source, of course. The File Task can be used to delete the old version of the Cache and rename the new file to the name you used when configuring the first look-up.&lt;/P&gt;
&lt;P&gt;Examples of how to build the packages discussed in the post can be downloaded from &lt;A href="http://gosqlserver.net/downloads/ttfnfssis100part2.zip"&gt;http://gosqlserver.net/downloads/ttfnfssis100part2.zip&lt;/A&gt; .&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8570" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/cache/default.aspx">cache</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/cache+transform/default.aspx">cache transform</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/lookup+component/default.aspx">lookup component</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>The Top Five New Features in SSIS 2008 for Developers, Part 1</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/08/18/8452.aspx</link><pubDate>Mon, 18 Aug 2008 20:56:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8452</guid><dc:creator>ktegels</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8452.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8452</wfw:commentRss><description>&lt;P&gt;You have to give credit where credit is due, and I certainly have to give credit to Kirk Haselden et al and their book &lt;U&gt;Microsoft SQL Server 2005 Integration Services&lt;/U&gt;. That book -- and&amp;nbsp;some of trial and error -- taught me&amp;nbsp;a lot about how to tune data flow tasks for better performance. The folks at Simple Talk have part of the book online and specifically about tuning data flows (&lt;A class="" title=http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-ssis-tuning-the-dataflow-task/ href="http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-ssis-tuning-the-dataflow-task/" target=_blank&gt;http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-ssis-tuning-the-dataflow-task/&lt;/A&gt;). If you aren't all that familiar with the tuning of SSIS 2005 data flows, it's a great piece to read before going at the rest of this article.&lt;/P&gt;
&lt;P&gt;I'd love to say that you don't need to worry about data flow tuning in SQL Sever 2008 Integration Services (SSIS100), but I can't. What I can say is you need to focus less on CPU allocation and utilization. As noted in the aforementioned article, in SSIS 2005 CPUs are allocated statically as the data flow task initializes. Basically, this means that if the optimizer for SSIS 2005 determines that it only needs one or two CPUs to execute the data flow, that is all it would ever use even if more CPUs were available to work the data flow. What change for SSIS100 is that CPU are now dynamic scheduled based on amount of "flow pressure" and all available CPUs are utilized. "Slower" tasks can now get more CPU time.&lt;/P&gt;
&lt;P&gt;Why did the SSIS team decide to use static scheduling in SSIS90 but dynamic scheduling in SSIS100? The answer is simple: back in 2002 to 2004 when SQL Server 2005 was being planned and developed, multiple CPU hosts were not as common as they are today. When you only have one or two CPUs to work with, static schedule is easier and has the least execution plan generation time and cost. However, now that most production-level hosts have four or more CPUs to work with, dynamic allocation is a more efficient solution. On multiple CPU machines, this change enhances performance considerably in many cases. On the downside, on single CPU machines, performance may actually degrade some, so it is certainly something you want to know about and consider.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8452" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/cache/default.aspx">cache</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>A detour: Building a MultiPolygon with SqlGeometryBuilder</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/08/15/8404.aspx</link><pubDate>Fri, 15 Aug 2008 15:36:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8404</guid><dc:creator>ktegels</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8404.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8404</wfw:commentRss><description>&lt;P&gt;The RTM version of SQL Server 2008 and recently release of the CLR updates with Visual Studio 2008 SP1 gave us the SqlGeometryBuilder and SqlGeographyBuilder classes to work with. These are very handy, simple APIs but, well, lets just say that the documentation on them is a bit lacking (Isaac Kunen's as some discussion of them at &lt;A class="" title="Our Upcoming Builder API" href="http://blogs.msdn.com/isaac/archive/2008/05/30/our-upcoming-builder-api.aspx"&gt;Our Upcoming Builder API&lt;/A&gt;). This morning, I wanted to write a few bits of .NET code that did the same work as this T-SQL statement:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;declare @p geometry = geometry::STGeomFromText('MULTIPOLYGON(((-77.054700 38.872957,-77.057962 38.872620,-77.058547 38.870079,-77.055592 38.868840,-77.053217 38.870656,-77.054700 38.872957),(-77.056972 38.870639,-77.055851 38.870219,-77.054875 38.870864,-77.055452 38.871804,-77.056784 38.871655,-77.056972 38.870639)),((-77.056408 38.875290,-77.056947 38.875224,-77.057466 38.873598,-77.057273 38.872737,-77.055335 38.873020,-77.055499 38.874058,-77.056408 38.875290)))',4326);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;The trick here is how do you delimit the rings of a polygon and how do you make a collection? It helps to keep four simple rules in mind:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;After instantiating the Builder, immediately set the Spatial Reference ID (SRID) you want to use. You must do this before you define any elements in the collection.&lt;/LI&gt;
&lt;LI&gt;In the case of a collection type, you need to call .BeginGeometry passing in a member of the OpenGisGeometryType enumeration for the desired collection.&lt;/LI&gt;
&lt;LI&gt;Each figure in the collection needs to started with a call to .BeginGeometry as well.&lt;/LI&gt;
&lt;LI&gt;Collection members must be well-formed. The collection must also be well-formed.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Keeping all that in mind, here's example method for constructing the geometry shown above:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;private static SqlGeometry CreateMultipolygon() {&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Create a new Geometry Builder to work with&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; SqlGeometryBuilder gb = new SqlGeometryBuilder();&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Set the Spatial Reference ID to 1&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; gb.SetSrid(1);&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Start the collection&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; gb.BeginGeometry(OpenGisGeometryType.MultiPolygon);&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Start the first element in this collection&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; gb.BeginGeometry(OpenGisGeometryType.Polygon);&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Define the first element (figure)&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; gb.BeginFigure(-77.054700,38.872957);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.057962, 38.872620);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.058547, 38.870079);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.055592, 38.868840);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.053217, 38.870656); &lt;BR&gt;&amp;nbsp; gb.AddLine(-77.054700, 38.872957);&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// End the first element (figure)&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; gb.EndFigure();&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Define the second figure&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp; gb.BeginFigure(-77.056972, 38.870639);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.055851, 38.870219);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.054875, 38.870864);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.055452, 38.871804);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.056784, 38.871655);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.056972, 38.870639);&lt;BR&gt;&amp;nbsp; gb.EndFigure();&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// End the first polygon&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; gb.EndGeometry();&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Define the second polygon&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; gb.BeginGeometry(OpenGisGeometryType.Polygon);&lt;BR&gt;&amp;nbsp; gb.BeginFigure(-77.056408, 38.875290);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.056947, 38.875224);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.057466, 38.873598);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.057273, 38.872737);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.055335, 38.873020);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.055499, 38.874058);&lt;BR&gt;&amp;nbsp; gb.AddLine(-77.056408, 38.875290); &lt;BR&gt;&amp;nbsp; gb.EndFigure();&lt;BR&gt;&amp;nbsp; gb.EndGeometry();&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// End (close) the collection&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; gb.EndGeometry();&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;// Return that as a SqlGeometry instance&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; return gb.ConstructedGeometry;&lt;BR&gt;}&lt;/CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8404" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Builder+API/default.aspx">Builder API</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SqlGeometry/default.aspx">SqlGeometry</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SqlGeometryBuilder/default.aspx">SqlGeometryBuilder</category></item><item><title>The Top Five New Features in SSIS 2008 for Developers, Part 0</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/08/14/8387.aspx</link><pubDate>Thu, 14 Aug 2008 17:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8387</guid><dc:creator>ktegels</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8387.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8387</wfw:commentRss><description>&lt;P&gt;I am going to get myself in trouble (again) by saying this but SSIS isn’t a Business Intelligence tool as much as it is a developer tool. If you are like me, you have written a lot of code does, basically, the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Extracts the data from some place;&lt;/LI&gt;
&lt;LI&gt;Transforms that data somehow;&lt;/LI&gt;
&lt;LI&gt;Loads the transformed data into database or some other store.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Sure, my toolset has changed over the years from COBOL to Perl, Expect and QuickBasic to VBScript to C#, but the basic tasks have not. That is probably why I never warmed up to SQL Server 2000 DTS. The idea of extract, load and transform never really worked for me. I wanted streams, not tables.&lt;/P&gt;
&lt;P&gt;So when SSIS debuted with SQL Server 2005, I decided to make the effort to learn it to the best of my abilities. Yes, it is a great tool but like any tool, it does have some shortcomings:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Optimizing data flows is somewhat of a black art;&lt;/LI&gt;
&lt;LI&gt;Using the linear lookup with a remote server is slow... unless you "cheated";&lt;/LI&gt;
&lt;LI&gt;Transact-SQL lacks an UPSERT command (at least prior to 2008);&lt;/LI&gt;
&lt;LI&gt;Calling a Web Service from a script required building an external assembly and making it available to the Script runtime;&lt;/LI&gt;
&lt;LI&gt;I am back to writing scripts in BASIC. Compiled BASIC with the full range of the CLR, sure, but it is still, well BASIC.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Over the next few posts, I want to talk about the new features in SSIS 2008 that help address these shortcomings in SSIS 2005. However, if you saw my recent talk in Omaha, you already know the story. But as of this morning, you can get the bits too! Just browse to &lt;A href="http://www.4shared.com/dir/7670149/a1b13c97/Omaha_SQLBI_User_Group.html"&gt;http://www.4shared.com/dir/7670149/a1b13c97/Omaha_SQLBI_User_Group.html&lt;/A&gt; and, when prompted for a password, enter "SQL4You" (sans quotes, of course). My presentation and bits are in the file labeled "ug_wnissis100.zip" &lt;/P&gt;
&lt;P&gt;Sudhir Gajre’s excellent performance tuning for SQL Server 2005 deck is also available from that site.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8387" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/cache/default.aspx">cache</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/scripting/default.aspx">scripting</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>When is a bug not a bug?</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/07/26/8053.aspx</link><pubDate>Sat, 26 Jul 2008 11:04:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8053</guid><dc:creator>ktegels</dc:creator><slash:comments>9</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/8053.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=8053</wfw:commentRss><description>&lt;STRONG&gt;I guess when the developers decide it is&amp;nbsp;not.&lt;/STRONG&gt; Consider the following query: &lt;PRE&gt;drop table dbo.shapeParts
go
create table dbo.shapeParts(
     shapePartID tinyint not null identity(1,1) primary key,
     shapeID tinyint not null,
     shapeQuad tinyint null,
     shape geometry not null);
go
insert into dbo.shapeParts values
(1,0,geometry::STGeomFromText('POLYGON((0 1,1 1,1 2,0 2,0 1))',1));
insert into dbo.shapeParts values
(1,1,geometry::STGeomFromText('POLYGON((1 1,2 1,2 2,1 2,1 1))',1));
insert into dbo.shapeParts values
(1,2,geometry::STGeomFromText('POLYGON((0 0,1 0,1 1,0 1,0 0))',1));
insert into dbo.shapeParts values
(1,3,geometry::STGeomFromText('POLYGON((1 0,2 0,2 1,1 1,1 0))',1));
go
create spatial index shapeindex on dbo.shapeParts(shape)
using geometry_grid with (
     bounding_box =(0, 0, 2, 2),
     grids =(level_1 = low,level_2 = low,level_3 = low,level_4 = low),
     cells_per_object = 1)
go
declare @g2 geometry = geometry::STGeomFromText('POINT(1 1)',1);
select top(1) *
from dbo.shapeParts with(index(shapeIndex))
where (shape.STContains(@g2)=1)
or (shape.STIntersects(@g2))=1
go&lt;/PRE&gt;The Books Online topic "Geography Methods Supported by Spatial Indexes" reads: 
&lt;BLOCKQUOTE&gt;Under certain conditions, spatial indexes support the following set-oriented geography methods: STIntersects(), STEquals(), and STDistance(). To be supported by a spatial index, these methods must be used within the WHERE clause of a query, and they must occur within a predicate of the following general form: geography1 . method_name ( geography2 ) comparison_operator valid_number To return a non-null result, geography1 and geography2 must have the same Spatial Reference Identifier (SRID). Otherwise, the method returns NULL.&lt;/BLOCKQUOTE&gt;. What's in question here is what does "under certain conditions" means. The seems simple enough and for other data types, the type of operation preformed with multiple filter predicates is not an issue, but if you actually try to execute this query in RC0, you get an execution time error: 
&lt;BLOCKQUOTE&gt;Msg 8635, Level 16, State 10, Line 2&lt;BR&gt;The query processor could not produce a query plan for a query with a spatial index hint. Reason: Could not find required comparison predicate. Try removing the index hints or removing SET FORCEPLAN.&lt;/BLOCKQUOTE&gt;This seemed like a bug to me, so I filed it on connect (see &lt;A class="" title=https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=357578) href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=357578)" target=_blank&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=357578)&lt;/A&gt;. The response? 
&lt;BLOCKQUOTE&gt;"Thank you for the bug submission. Spatial indexes match only WHERE/ON clauses made of single atomic predicates or ANDs thereof -- not ORs. We also do not infer that STIntersects here is redundant."&lt;/BLOCKQUOTE&gt;The response that came back was authoritative and well-reasoned. Yet it also smacks of "its not an error because we say it isn't." Hopefully this response (and kind of response) will be reconsidered in the future.&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=8053" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category></item><item><title>Come learn more about SQL Server 2008 Integration Services</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/07/22/7963.aspx</link><pubDate>Tue, 22 Jul 2008 12:55:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7963</guid><dc:creator>ktegels</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/7963.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=7963</wfw:commentRss><description>&lt;P&gt;On 6 August 2008, I will be giving a presentation to the Omaha SQL/BI User Group on the new features in SQL Server 2008 Integration Services. We will talk about improvements in scripting, how the redesigned pipeline improves performance and how to leverage the new Cache Transform to improve package performance. Quinn Jones from Farm Credit Services America will also be giving us a great SQL tip. The talk will start around 1800 local time. We will be meeting at the Creighton University West Campus, located at 11111 Mill Valley Road (roughly 41.267786° north, 96.086289° west).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The "3P requirements" for a successful meeting -- Pizza, Pop and Prizes --- will be available as usual.&lt;/P&gt;
&lt;P&gt;Please leave a comment if you would like more information.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7963" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/cache/default.aspx">cache</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Merge/default.aspx">Merge</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/omaha/default.aspx">omaha</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/scripting/default.aspx">scripting</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Call For Action: Spatial "geeks," please speak up!</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/07/08/7726.aspx</link><pubDate>Tue, 08 Jul 2008 15:11:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7726</guid><dc:creator>ktegels</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/7726.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=7726</wfw:commentRss><description>&lt;P&gt;I've had a lot of "fun" working the with new spatial types in SQL Server 2008. &lt;EM&gt;Fun&lt;/EM&gt; like your first root canal sometimes, &lt;EM&gt;fun&lt;/EM&gt; like a great first date other times.&lt;/P&gt;
&lt;P&gt;One of the "root canal moments" for me has been around Geographic Markup Language (GML) support. I had spent a good chunk of time generating GML for use in class to subsequently learn that SQL Server's support for GML is "limited." Isaac Kunen was kind enough to point me to &lt;A href="http://schemas.microsoft.com/sqlserver/profiles/gml/"&gt;http://schemas.microsoft.com/sqlserver/profiles/gml/&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Folks, please learn from my mistake -- understand that schema before you go about generating or consuming GML for the construction of geometry or geography instances.&lt;/P&gt;
&lt;P&gt;Speaking of best practices, another frequent pendant on the&amp;nbsp; MSDN Forums/SQL Server Katmai/SQL server Katmai Spatial forum has started a thread (&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3586982&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3586982&amp;amp;SiteID=1&lt;/A&gt;) addressing the differences between geometry and geography types.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think he's off to a great start but I'd like to have the "the rest of us" who are interested in the spatial bits chime in on the tread.I'll even come out and say it. &lt;STRONG&gt;Please.&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;July is going to be a busy month for me. On week of the 20th, I'll be teaching our Essential SQL Server class in Boston (see &lt;A href="http://www.develop.com/us/training/course.aspx?id=180"&gt;http://www.develop.com/us/training/course.aspx?id=180&lt;/A&gt;) and then doing a private engagement in the Sacramento area the next week. If you know of any user group/PASS group meetings in those areas around those areas, please let me know.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7726" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/GML/default.aspx">GML</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>Upcoming talks on SQL Spatial and SSIS</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/06/05/7153.aspx</link><pubDate>Thu, 05 Jun 2008 12:42:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7153</guid><dc:creator>ktegels</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/7153.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=7153</wfw:commentRss><description>&lt;P&gt;Yesterday I drove down from Sioux Falls to Omaha so that I could catch a talk being given by Sudhir Gajre to the &lt;A href="http://www.omahamtg.com/" target=_blank&gt;Omaha SQL Server/BI Interest Group.&lt;/A&gt; I first got to know Sudhir when he, I and Luke Schollmeyer were restarting a SQL Server Users Group in Omaha. Sudhir is a stud at SQL Server performance tuning and helped write one of the best papers on it (see &lt;A href="http://sqlcat.com/whitepapers/archive/2007/12/16/microsoft-sql-server-2005-tuning-tips-for-peoplesoft8-x.aspx" target=_blank&gt;Microsoft SQL Server 2005 Tuning Tips for PeopleSoft8.x&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;I am the next scheduled speaker for that group, so I took a couple of minutes last night to ask them what they would like me to talk about. Response was a little slow, so I suggest that I could give my Spatial Computing with SQL Server talk. Almost no reaction. &lt;/P&gt;
&lt;P&gt;Somebody in the group suggest talking about the new MERGE statement. I liked that said, "What if I wrapped that into a talk about "What is new in Integration Services 2008." The room came back to life. &lt;/P&gt;
&lt;P&gt;So here's an initial outline of what that talk will probably cover: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The changes in the SSIS pipeline architecture for back-pressure and thread scheduling The scripting environment changes &lt;/LI&gt;
&lt;LI&gt;Working with the Cache transformation &lt;/LI&gt;
&lt;LI&gt;Using T-SQL MERGE with SSIS &lt;/LI&gt;
&lt;LI&gt;Using Change Data Capture with SSIS &lt;/LI&gt;
&lt;LI&gt;(time permitting) Using the Data Profiler task &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;We clustered about for a while following Sudhir's talk discussing just how much BI is taking off for Microsoft and how useful a talk like this would be. I have to chuckle every time I get into a conversation like this: I my opinion, SSIS isn't a BI tool that developers just happen to be interested in, it's a Developer's tool that just happens to very helpful to the BI specialist. Really understanding and applying many of the changes for SSIS 2008 is made easier, I think, if you have a Developer mindset about it. &lt;/P&gt;
&lt;P&gt;I am going to submit&amp;nbsp;the "Whats new in SSIS 2008"&amp;nbsp;for the Heartland Developer's Conferences to be held later in the year in &lt;A href="http://www.heartlanddc.com/Omaha/%22" target=_blank&gt;Omaha&lt;/A&gt; and &lt;A href="http://www.heartlanddc.com/Minneapolis/" target=_blank&gt;Minneapolis&lt;/A&gt; too.&lt;/P&gt;
&lt;P&gt;If you are a user group leader and would be interested in having me come visit and give a talk, please feel free to contact me through this site.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7153" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Heartland+Developers_2700_+Conference/default.aspx">Heartland Developers' Conference</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Integration+Services/default.aspx">Integration Services</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Merge/default.aspx">Merge</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>The thing I hate about missing TechEd is getting the eye candy late</title><link>http://sqlblog.com/blogs/kent_tegels/archive/2008/06/05/7148.aspx</link><pubDate>Thu, 05 Jun 2008 11:51:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7148</guid><dc:creator>ktegels</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/kent_tegels/comments/7148.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/kent_tegels/commentrss.aspx?PostID=7148</wfw:commentRss><description>&lt;P&gt;But this eye candy is worth waiting for.&amp;nbsp; What I am talking about?&lt;/P&gt;
&lt;P&gt;I have spend that last weeks nose down in the Spatial bits for SQL Server 2008. I really believe this is the darkhorse super feature of the product. But a big problem with it has been visualizing the results. Unless you good at mentally visualing spatial relationships, it can be pretty hard to make sense of some the spatial based queries you are likely to want to use. Since CTP5, I&amp;nbsp;have been using Morten Nielsen's &lt;A href="http://www.iter.dk/page/SQL-Server-2008-Spatial-Tools.aspx" target=_blank&gt;SQL Server 2008 Spatial Tools&lt;/A&gt; quite happily.&lt;/P&gt;
&lt;P&gt;In &lt;A href="http://blogs.msdn.com/isaac/archive/2008/06/02/eye-candy-of-the-highest-order.aspx" target=_blank&gt;Eye Candy of the Highest Order&lt;/A&gt;, IsaacK introduces the Spatial Results pannel for SSMS. In short, you no longer have to suffer with this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/isaac/WindowsLiveWriter/EyeCandyoftheHighestOrder_839F/image_thumb_1.png"&gt;&lt;/P&gt;
&lt;P&gt;Because you render the data like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/isaac/WindowsLiveWriter/EyeCandyoftheHighestOrder_839F/image_thumb_4.png"&gt;&lt;/P&gt;
&lt;P&gt;Yum! The downside is that this &lt;B&gt;won't&lt;/B&gt; be in RC0 but, per Isaac, should be in RTM.&lt;/P&gt;
&lt;P&gt;Issac has also started talking about some new features that will make constructing geo* instances easier with the new Builder APIs. Check out &lt;A href="http://sqlblog.com/controlpanel/blogs/" target=_blank&gt;Our Upcoming Builder API&lt;/A&gt; for the details.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7148" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/Katmai/default.aspx">Katmai</category><category domain="http://sqlblog.com/blogs/kent_tegels/archive/tags/spatial/default.aspx">spatial</category></item></channel></rss>