Sponsored by:

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...

Test data done right with SQL Data Generator

A series of discussions last week got me around to talking about the right way to test a system against a realistic set of data. The problem is simply this: without data in the test environment which is representative of what you’ll end up with in the production environment, it’s very difficult to properly simulate the way the app will behave after it rolls out.There are a whole bunch of counter-techniques for the empty database problem ranging from the tedious to the impractical to the downright ridiculous. And then there’s Red Gate’s SQL Data Generator, which is none of these. In fact it’s almost magical when you see it...

Making friends with Red Gate

I’ve spent quite a bit of time writing about Red Gate products over the last year, particularly SQL Source Control which is simply the best damn way to finally get those pesky databases into VCS. The fact that it now plays nice with first cousins SQL Compare and SQL Data Compare means the dream of VCS sourced automated deployments of data and schema for the masses is finally a reality. What I like about the Red Gate products in general is that they take traditionally laborious, low-value tasks and totally transform the way we approach them. Migrating a database? Just SQL Compare it in a few clicks rather than manually writing time consuming, error prone scripts. Load testing...

My Simple-Talk article on Continuous Integration for SQL Server Databases

I must have struck a chord with the folks at Red Gate recently when I wrote about Automated database releases with TeamCity and Red Gate. Inadvertently, I managed to get this post out right in the final stages of their work on SQL Source Control 2 which added the ability to version static data. This was pretty opportune timing and caused me to rewrite – and significantly simplify – a fair swathe of the post.Clearly the post was a glowing endorsement of their tools, and rightly so. In conjunction with TeamCity, they’ve helped me to fill a fairly gaping hole in the CI process and bring the DB up to a first class citizen with the application...

Automated database releases with TeamCity and Red Gate

Databases have long been the poor cousin of the application tier when it comes to many of the processes we take for granted in the .NET world. Source control management, for example, is near ubiquitous for application files and there are several excellent VCS products which make versioning a breeze. Continuous integration is another practice which although not as common, is still frequently present in a robust application lifecycle.Of course the problem is that database objects don’t exist as simple files that can be versioned, nor can you just pick them up and place them in a target location when you want to deploy them. You’ve got to consider the very nature of databases being...

My SQL Source control article on Simple-Talk

I’ve previously written about Rocking your SQL Source Control world with Red Gate and was bullishly optimistic about the potential for finally providing the means for simple, effective version control of database objects. It turns out the post struck a chord with the folks at Red Gate and they asked me if I’d like to contribute to an article in Simple-Talk, a fantastic bi-monthly newsletter with about 150,000 subscribers. It’s now online here:Foolproof Atomic Versioning of ApplicationsI’m a long time subscriber to Simple-Talk and it’s one of the few tech newsletter I actually still get delivered by email; everything else has been demoted to RSS or increasingly, only...