Dynamic SQL scripting on Windows Phone 7 with LINQ

I recently had cause to look into running dynamic SQL on WP7 for a customer. On a desktop this is easy, you just run some SQL statements through ADO.NET and you’re sorted. On Windows Phone 7 it’s a little trickier. This is because WP7 only exposes LINQ to SQL and it doesn’t support arbitrary SQL…

0

Partition limit increased to 15,000 in Sql 2008 R2 SP1

Just been going over the whitepaper ‘Support for 15,000 partitions in Sql 2008 SP2′ which is now updated to be ‘and Sql 2008 R2 SP1′ – which is fortunate because: 1) it was updated in March this year, and 2) has a concrete reference to Sql 2008 R2 sp1 (we’re currently at CU #6, released…

0

VS2010: Could not read result repository, Named Pipes etc

I’ve just come across a problem with load testing on Visual Studio 2010 (which probably amounts to a RTFM issue, but who does that anyway?) When installing the load test controller I specified the machine name as ‘.’. Nothing in the setup told me this would be a problem, but it was. When I then…

0

DateTime as BigInt

Been looking at writing RML utilities for Analysis services, and having some success, however, the function that kept coming up was generating the datetime as a bigint -> all I really need is the number of zeros for each value. For my own sanity here is the current datetime down to the nearest second expressed…

0

My new favourite diagnostic query for CPU

So, what do you do when you’ve been running a stress test, Sql CPU has been maxing out, and you’ve not been running profiler (to analyze in RML Utils) so have got no record of what happened – ans, provided te DMVs haven’t been cleared by the time you get to the box, the following…

0

Cross Join Crazies and Scalar Value Function Optimization

Just on a flight out to TechReady, and took some time to finally pull this article together. And I apologise right now – I did promise my next post was going to be an MDX primer, but this one has been kicking around in my head now for a while. I’ll also add that this…

0

Mapping two Tables to one Entity in the Entity Framework

Whilst at Q-Con a few weeks ago someone asked me about how to map two database tables to one entity in the Entity Framework… something a lot of people want to do at some point or another. At this point I must thank Chris Barker for pinging me some links to get this working. It…

2

Flattening XML Data in SQL Server

If you’ve got some XML data in a SQL Server column, how can you flatten it out and query it or present it as though it was relational data? It turns out this is quite easy… Setup Let’s create a simple table to hold our data; CREATE TABLE XmlSourceTable (       RecordId INT IDENTITY(1,1) NOT…

0

Procedural versus Set-Based SQL

During my day job I come across customers that are struggling to make a system perform to the expectations of their users, and they often see this as a SQL Server problem. This post is designed to demonstrate how much of a difference your approach to SQL tasks can make to the performance and scalability…

0

Hierarchies with HierarchyID in SQL 2008

This post by Simon Ince explores the topic of Hierarchies with HierarchyID in SQL 2008. If you’ve been following my blog you should remember a couple of posts about hierarchical data in SQL Server, and how Common Table Expressions can be a great way to extract that data. If you’ve not read them, you can…

1