ARMED - Azure ARM VS Code extension

I have been working with ARM templates for a little while and have found it really annoying to test functions inside the templates, you see if you have an ARM template it is a JSON document made up of lots of key/values like: {"name": "a_name"} but it is slightly more complicated because there is a set of functions in a javascript like language you can use in the values so you might have:

Azure Virtual Machine + Premium Disk Throughput Calculator

UPDATE: I haven’t been keeping it up to date so deprecated it - if you find something like this useful moan at microsoft and get them to implement it! I keep having to refer to the virtual machine size page and the disks pricing page to work out how best to stripe disks for whichever type of virtual maching in Azure to work out what sort of throughput we can get so I thought I would save myself some ink and automate it, hopefully someone else finds this useful.

Fixing SQL AG Routing "Cannot find host" using packet analysis (and a spell checker)

I was setting up an availability group listener recently and when I tried to connect to the listener I got an error message to say “The host cannot be found” after the usual 15 seconds connection delay. I checked the usual thing like TCP was enabled on the replicas and that routing was configured, but every time I tried I kept getting the “The host cannot be found” error. Now, I don’t know about you, but I find error messages like this completely infuriating especially when I knew the hostname of the listener resolved because I could ping the damn thing (and then connect straight to the IP address.

"the input device is not a TTY" error running docker on VSTS build agent

I have been playing around with including all my build dependencies in docker for windows lately and had a build that kept giving me this error in the build log: “the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty’” The command I had been running was along the lines of: docker exec -it powershell.exe ./some/script.ps1 The problem was that I was using -it which means “interactive” and “create a virtual TTY”, to run my script I needed neither of those so took them off.

How do I use VSTS variables in YAML CI Build definitions?

Hey, VSTS YAML builds are my new favorite thing, by like a million miles. If you have a yaml build definition ( .vsts-ci.yml ) and you want to use one of the build variables then it isn’t totally clear how to include them in a definition (it hasn’t been out long so I expect more docs to come soon), while we wait for the docs if you want to use one of the variables from https://docs.

You have your database in source control now what?

This post is for a specific type of person if you are: New to source control Are getting started on your path to the continuous delivery nirvana Have been able to get your database into some sort of source control system Have more than one person checking in code to the database source You are unsure what yo do next Then this post is for you! Choosing a source control system and tools to manage your database code is a great hurdle to have got past, well done!

Running any AzureRM powershell command tells you to "Run Login-AzureRmAccount to login." even though you are logged in!

Every AzureRM command I was running I would get an error message telling me to login, I then did a login, checked that I had the right subscription and I was still getting the error message - after logging in 7 times I figured that maybe there was something else wrong :) It turns out that I had originally installed the Azure RM cmdlets via the Azure SDK and had somehow also managed to install the AzureRM.

Watching for powershell changes and running Invoke-Pester

It seems like more and more recently I have been writing powershell and typescript rather than c# and t-sql and there are quite a few things to like about the tools for both of these (typescript and powershell). One thing I really like with typescript and javascript in general is that it seems everything has a file system watcher so you can have your code ide, a couple of terminals and all your tests run etc in the background.

SSDT How To Fix Error SQL17502

TLDR: If you build an SSDT project you can get an error which says: “SQL71502: Function: [XXX].[XXX] has an unresolved reference to object [XXX].[XXX].” If the code that is failing is trying to use something in the “sys” schema or the “INFORMATION_SCHEMA” schema then you need to add a database reference to the master dacpac: Add a database reference to master: Under the project, right-click References. Select Add database reference…. Select System database.

A virtualized CPU forced me to eat my lunch early, every day, for weeks

I worked one particular contract where I was forced to take my lunch at 11:35 every day, and it was all virtualisations fault! To set the scene it was a company who wasn’t really used to having developers, they had a load of SQL analysts and some mainframe developers but SQL developers writing T-SQL, C# and SSIS code was new to them. The IT management had decided that buying actual computers wasn’t necessary for development.