Mastodon

SQL Server

A 4-post collection

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

Overcoming SQL 08’s globally insensitive time zones using .NET

I seem to spend a lot of time involved with web apps which end up having a lot of geographical diversity. Either they sit in a server in one country then get used by folks somewhere else or more often than not, they face audiences of a global nature spread out across varying time zones. And even if they do end up co-located, chances are it won’t always stay that way so there’s always a desire to add in a little future-proofing. When SQL 08 came along there seemed to be some new hope for making...

The unnecessary evil of the shared development database

Who remembers what it was like to build web apps on a shared development server? I mean the model where developers huddled around shared drives mapped to the same UNC path and worked on the same set of files with reckless abandon then fired them up in the browser right off the same sever. Maybe this is an entirely foreign concept to you but I certainly have vivid memories from the late 90s of building classic ASP apps (ye olde VB script) in Dreamweaver, side by side my fellow developers working...

Connecting to SQL08 on Windows 7 from a remote machine

I’ve got both a desktop and a laptop running SQL08 Developer Edition on top of 64 bit Windows 7 which until today, did not play nicely together. I could not get a remote connection from Visual Studio or SQL Management Studio to the other machine nor could I make an ADO.NET connection. Every attempt to connect resulted in a lengthy delay followed by a message such as the following from SQL Management Studio when trying to register the server: “Error connection to [machine name]” “A network-rela...