When ALTER TABLE doesn't work

We’re all used to being able to change things whenever we want. Heck, I put on a different pair of socks just to write this blog post! They’re my bloggin’ socks. But, back to the topic at hand, we’re used to being able to use ALTER TABLE commands to change tables in SQL Server. And, in fact, most of the time that just works. In-Memory OLTP and ALTER TABLE Way back in SQL Server 2014, when we first got In-Memory OLTP, it wasn’t possible to change a table once you’d created it.

Locking and Blocking and Immutable Data

Locking and blocking feel like a normal part of working with databases, right? Locking and blocking inevitably lead to deadlocks in our databases, too. A significant amount of both human and computer time is spent resolving these problems in the database. After all, if it weren’t for locking and blocking, database professionals would spend their time solving more important problems (like where to go to lunch). What if we didn’t have to deal with locking and blocking?

Script Libraries and Version Control

Raise your hand if your collection of T-SQL scripts is sitting in a folder under My Documents. Why isn’t that script library in version control? You have version control at work, right? [caption id=“attachment_957” align=“alignright” width=“300”] Not that kind of library[/caption] Why should I version my scripts? There’s three big reasons that you should version your scripts. The first is to have a history of your work. Version control lets you keep track of all your changes.

Using Tables for Fast Math

[caption id=“attachment_950” align=“alignright” width=“300”] Convert all the things![/caption] Relational databases are great for storing structured data. But the data we store doesn’t have to be user entered data. What if we use tables in the database to precompute the output of some kind of calculation? Our Conversion Table In this case, we’re doing a simple unit of measure conversion table. Pretty much everybody apart from America uses the metric system, so we’ll create a simple table that lets us look up conversions.

A New Adventure

[caption id=“attachment_948” align=“alignright” width=“300”]Look at all of these awesome people! (Not pictured: Angie, who is also awesome)[/caption] It’s time to start a new adventure! Over the last few years, I’ve had the pleasure to work with some really awesome people. Brent already wrote about the changes to the company, so I’ll leave that to him to explain. But, as of today, I’m funemployed. What’s next? I’m not sure. I’m going to take some time to relax and travel.

PowerShell Power for Presenters

As a presenter I frequently need to make sure that my laptop is not in low power battery saving mode. I also don’t want the screensaver to start up when I walk away from the computer and point at the screen. A while back, I showed you how to Control Power with PowerShell, but this time we’re going to go one step further - we’re going to build a presentation mode.

Controlling the Windows Power Plan with PowerShell

I’ve been using a Windows laptop for presenting while traveling. Yes, it’s heavy. Yes, it’s big. Yes, it’s weird compared to my MacBook. But, it works. More Power, More Problems When I’m on a plane, I want to make sure that I’m getting every last drop of power out of the battery. When I’m presenting, I want to power up the CPUs so I’m not getting weird results in demos because of power saving in the CPU.

Unsetting Key Bindings in emacs

I make use of emacs - my ability to customize the editor has made it easier for me to be productive. Switching between windows has always been a bit annoying in emacs. After reading Managing Emacs windows, I figured that I would give the ace-window library a try to see if it could solve my problems. After downloading ace-window and dropping the file in my .emacs, I was ready to go.

Ubuntu and the Sad Chrome Tab

Chrome has a reputation for being incredibly unstable on Linux. It’s been rock solid for me on other platforms, but on Linux (Arch, Ubuntu 14.04 LTS, and Ubuntu 14.10), I run into the “sad tab” multiple times a day. Since I use Chrome as a mail client, music player, word processor, calendar, and television, it’d be nice if it worked once in a while. Where a reasonable person would switch over to Firefox, I started digging to determine the cause.

Setting Up SQL*Plus in emacs

Emacs is a delightfully complex editor and, for those who love it, the only way they want to interact with the world. I’m a convert. I also work with relational databases. I wanted to add more functionality to emacs - I wanted to query Oracle directly from my text editor. Install SQL*Plus To get SQL*Plus working, grab a copy of the Oracle Instant Client and get cracking. Oracle have already documented this process, and your favorite distribution has probably done so, too.