Archives: March 2015
I ran across a post on microservices recently and was intrigued. I always like the idea of loosely coupled, independent items in software. However the idea of microservices causes issues with databases. Here’s the section in the piece by Netflix: Create a separate data store for each microservice.
I… Read more
I saw recently that Grant Fritchey wrote a review of his laptop, the Portege Z30. I had noted Grant’s issues with laptops and waited to see what he got last year before I replaced mine. I actually had the chance to compare his Z30 with my old Lenovo T430… Read more
I’d encourage you to take Ed Leighton-Dick’s challenge to blog in April. Read his post, start writing, and put your post out there. Tweet about it, and be proud.
Someone asked me the question recently about how tSQLt works with TRY..CATCH blocks and the exceptions that we might test for. It works fine, just as it would with other code, but you need to understand that a CATCH still needs to re-throw an exception.
Here’s a short example. I’ve… Read more
Have you written a TRY..CATCH statement in T-SQL? I hadn’t done it for most of my career, since the construct hadn’t existed. As a result, my code over the years is littered with catching @@error in a variable and then acting on that result.
However I’m trying to do better,… Read more
I’ll be traveling to CA next month for SQL Saturday #389 – Huntington Beach as well as a Red Gate DLM training session run by Ike Ellis. I’m assisting Ike in running a Database Continuous Integration class. It’s a paid for event, but you’ll learn how to set up and… Read more
I wrote the other day about measuring your career, and I gave some general advice, but I wanted to give you some thoughts to take away about how you might rate your career.
These are some suggested areas, with a note or two in there. I’m not saying any of… Read more
I’m going to do a shorter editorial on this, but really I think this deserves more treatment here.
I’m sure some of you have wanted to do this:
ALTER SCHEMA Steve AUTHORIZATION Steve
You realize this doesn’t work, and you can’t grant the user Steve, rights to his schema after it’s created. You can do this:
CREATE SCHEMA Steve Authorization Steve
UPDATE: Someone pointed out this works after… Read more
I found another use for Powershell, one actually suggested by someone else: attaching specific SQL Server databases.
TL;DR I have a script that detaches all user databases from a SQL Server instance and then reattches certain ones. Full script at the end.
We have a lot of demo… Read more
I was testing something the other day and realized this was a security area I didn’t completely understand. I decided to write a few posts to help me understand the issues.
I want to give a developer rights to create objects in a schema. In this case, I’ll stick with… Read more
A short piece, as I ran into the need recently to alter a column to NOT NULL status. I’ve rarely done this in the past, usually specifying NOT NULL when I create the table. Often in future changes, I’ve been wary of not allowing NULLs since I’ll always find an… Read more