Red Gate

A 12-post collection

Azure will save you from unexpected Godzilla attack part 2: Red Gate will save you from yourself

These real world experiences with Azure are now available in the Pluralsight course "Modernizing Your Websites with Azure Platform as a Service" Yesterday I wrote part 1 of this 2 part series and explained the Godzilla redundant approach of storage in Azure. Each bit of data you put into Azure storage gets replicated multiple times over within the same data centre so that you have redundancy against local failures (i.e. an unexpected Godzilla smash-and-grab). I also explained how it won’t save you from your own stupidity (or my own stupidity in the case I gave) and for that I configured automatic exports of SQL Azure to geo-redundant storage. Now it’s time to tackle...

5 minute wonders: Finding lazy loading nasties with ANTS Profiler

There will be those who disagree with me (hi DBAs!) but ORMs totally rock. Object Relational Mappers have been around for a while now and you may know them by names such as LINQ to SQL, NHibernate and Entity Framework (among others). The idea of ORMs is that all the plumbing between entities in the app and entities in the database can be abstracted away into a managed framework so that data access can become a no-mess, no-fuss affair. As with many automated ways to build apps, ORMs have their pitfalls and one of the worst – and most common – is the dreaded “n+1” brought about by lazy loading. Here’s how an n+1...

Making unit tests in SQL Server a first class citizen with Red Gate’s SQL Test

Who here doesn’t write enough unit tests? I mean other than me? Somehow no matter how good my test coverage gets I always fell like there are some bits missing. Partly this is because unit testing practices tends to be one of those religious debates and you if you listen to enough people, it’s easy to convince yourself you’re doing it wrong. One area that’s always been a little tricky is testing anything with a database dependency. In part, this is because those tests often end up being dependent on the data itself which, of course, can be highly volatile. But it’s also philosophically challenged in that if a unit...

Embracing guesswork with SQL Prompt partial matches

Who here has become rather dependent on Visual Studio’s intellisense? C’mon, be honest, no matter hard-core you are or how impure you think intellisense is you always end up using it to some degree, even if it’s just for discovering object behaviours. Back when Visual Studio 2010 launched we got some pretty nifty improvements in intellisense which were previously only available by way of third party tools like ReSharper. The improvements included the ability to partially match a string anywhere within the possible result set and the ability to match by Pascal and camel case. Today, Red Gate brings these features to SQL Prompt. Getting experimental First up, get yourself SQL Prompt. Try it...

Taking the pain out of database discovery with Red Gate’s SQL Search

Today I had cause to take a slightly different direction with a database that had stood for many years providing a fairly critical business function. The change of direction involved dropping a few columns out of a core table with references across an unknown number of procedures and views. What could go wrong?! Let me start by saying that whilst I spend a lot of time in SQL Server, I’m no DBA and there may well be easier ways of doing this, but in years gone by I would have kicked off by trawling through system tables to find occurrences of the column in question. This worked, but it’s a little clunky and I always had...