Category: Blog

  • Day of Data Baton Rouge Slides and Code

    Thanks to everyone for attending my talk today at Day of data Baton Rouge 2026 (formerly SQL Saturday Baton Rouge).

    The slides are here: Building an API with DAB – Baton Rouge

    The repo for the code and demos is here: DAB-Experiments

    Use the Getting Started folder for the setup and demos as batch files. This is for SQL Server with a user set as JoeUser. Change this in the .env file if you want to alter this. I use Northwind, with a few additions in the .sql files.

    Apologies, it’s not completely organized as I am still working on the flow and structure. feel free to reach out with questions.

  • Moving on from Tesla

    We decided to sell our Tesla Model Y. It’s been almost 5 years, and it’s (still) an amazing car. My wife, however, wants something more luxurious. As cool of a car as it is, and how well it performs, it’s not luxurious inside. The ride can be stiff, the seats are good, not great, and we’re ready for something else.

    We’ve been testing a few different SUVs, as we don’t want anything smaller than the Model Y. We ended up choosing a Lucid Gravity, which feels like an advanced version of a Tesla in many ways. It doesn’t self-drive, but it’s a very, very nice car inside and drives like a computer.

    A luxury computer that is very comfortable.

    What’s amazing is I listed the Tesla and had 6 people ping me that day for the car. I showed it to one and he liked it, so we’re in the process of getting paperwork done. I haven’t sold a car in a long time that had a loan, and I’m surprised at the weird challenges that this entails.

    It’s been 4.8 years with the Model Y and it’s still an amazing car. No real problems with it, it’s performed well, and the battery health is still at 88%. What’s even more amazing is that moving to 18” wheels netted me better performance than I ever had, with my last, around town 200 miles showing 205Wh/mi. Kind of amazing.

    2026-07_0364

  • The Book of Redgate: Products

    We are product focused at Redgate Software. Here is another of our values that focused on this:

    2026-04_0231

    The text on the next page is:

    Shipping something amazing is better than creating something average and to budget and on time. We cannot market, sell, manage or account our way to success.

    We have tried to do that. I’ve used many of our products before coming to work for Redgate. My former partners at SQL Server Central used them extensively as well. Since I have been an employee, I’ve worked with a lot of customers who constantly find value in our products.

    I think we’ve succeeded, and I think that us trying to build useful software is what has helped. My fellow advocates and I constantly try to bring the voice of the customer to Redgate so that our engineers better understand your challenges. This helps them build things that are useful.

    I have a copy of the Book of Redgate from 2010. This was a book we produced internally about the company after 10 years in existence. At that time, I’d been there for about 3 years, and it was interesting to learn a some things about the company. This series of posts looks back at the Book of Redgate 15 years later.

  • Changing the Owner Removes Permissions: #SQLNewBlogger

    This is actually inspired by an article SQL Server Central, which taught me something new. I decided to verify what was in the article and do some research. The summary

    tl;dr if you change the schema owner, all permissions are dropped.

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    The Scenario

    We start by creating three logins and their corresponding database users. Think of them as three colleagues with different roles:

    • User1 — will own the schema
    • User2 — will be granted access to a table
    • User3 — will eventually take over schema ownership

    Imagine there are a lot of User2 variants, as different logins are granted access to this table. To me, this is a problem, and I would use a role if I managed the system.

    CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1'
    CREATE USER User1 FOR LOGIN User1
    GO
    CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2'
    CREATE USER User2 FOR LOGIN User2
    GO
    CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3'
    CREATE USER User3 FOR LOGIN User3
    GO

    Next, we create a schema explicitly authorised to User1, then add a table to it and populate it with some sample data.

    CREATE SCHEMA MySchema AUTHORIZATION User1
    GO
    CREATE TABLE MySchema.MyTable (myid INT)
    GO
    INSERT MySchema.MyTable (myid)
    VALUES (1), (2), (3)
    GO
    SELECT * FROM MySchema.MyTable
    GO

    At this point, User1 owns MySchema. Any objects inside it — like MyTable — fall under that ownership.

    Now we grant User2 SELECT permission on the table. This is straightforward, explicit, and intentional. I’ll perform an explicit grant of permissions here.

    GRANT SELECT ON MySchema.MyTable TO User2
    GO

    We can verify it works by impersonating User2 and running the query:

    SETUSER 'User2'
    GO
    SELECT * FROM MySchema.MyTable
    GO
    SETUSER
    GO

    The query succeeds and returns all three rows. So far, everything is working as expected, as we see below..

    2026-06_0119

    Now, the tricky part I didn’t know.

    Here’s where things get interesting. A database administrator decides to transfer ownership of MySchema from User1 to User3:

    ALTER AUTHORIZATION ON SCHEMA::MySchema TO User3;
    GO

    This might seem like a routine administrative change — just updating who “owns” the schema. No permissions were explicitly revoked. No error is raised. But something has quietly changed.

    If I now run the code above, I can’t access the table as User2.

    2026-06_0120

    I’ve lost access. If I check the ALTER AUTHORIZATION docs, I see this, with the last sentence being the important one. Permissions are dropped.

    2026-06_0122

    Something to know, and glad that Prompt AI knows this:

    2026-06_0121

    Summary

    If you change the owner (authorization) on an object, and it’s not a database, permissions are dropped. This should be a warning at the very least, though to be fair, I’ve never changed schema ownership. It could happen, but in general, I try to keep dbo as the owner of all schemas.

    In any case, something good to know.

    SQL New Blogger

    I took some code from an article I read (edited, really) and then used it to setup a scenario to test the concept. I likely will never forget this, and if I an AI suggests this, or can’t figure out what went wrong, I’ll have some idea myself to verify or validate a fix.

    This post took about 20 minutes, including running the code a few times to test things, but it was a good exercise to show what I know, how I can use AI, and how I can spot issues.

    You could use something like this as a learning exercise and to showcase your skills, even in the age of AI.