Category: Blog

  • Friday Flyway Tips–Dark Mode

    I saw a post that Flyway Desktop has a dark mode and I had to try it out.

    I’ve been working with Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.

    Dark Mode

    In general, I’m not a big dark mode person. I tend to use browsers in light mode, like this:

    2024-02-07 15_17_17-SQLServerCentral – The #1 SQL Server community

    I regularly work in VSCode, which is light for me.

    2024-02-07 15_17_28-SQLSat1076.yml - sqlsatwebsite - Visual Studio Code

    And of course, SSMS is light. I know lots of people have wanted a dark mode, and you can configure that, but it’s a mess. To me, I just like light mode.

    2024-02-07 15_18_10-SQLQuery9.sql - ARISTOTLE.DMDemo_1_Dev (ARISTOTLE_Steve (55))_ - Microsoft SQL S

    However, someone posted a note internally a Redgate thanking engineers for dark mode.

    Wha??? I had to try it.

    It looks interesting.

    2024-02-07 15_20_57-Flyway Desktop

    I don’t know if I’ll use it, but it’s easy to enable, and I can switch anytime. In the top bar, there are a number of icons. There’s a moon for one, which you see above and below, because I’m in dark mode.

    2024-02-07 15_21_45-Flyway Desktop

    If I click the left-most one above, I see this:

    2024-02-07 15_22_05-Flyway Desktop

    Now I have a sun, and a light mode.

    2024-02-07 15_22_18-Flyway Desktop

    This works on all tabs, on the VCS blade, and it gives you the option to work with either a white or dark background.

    That’s pretty cool. I don’t care so much, but I know lots of people do, so they now get the option.

    Try Flyway Enterprise out today. If you haven’t worked with Flyway Desktop, download it today. There is a free version that organizes migrations and paid versions with many more features.

    Video Walkthrough

    I made a quick video showing this as well. You can watch it below, or check out all the Flyway videos I’ve added:

  • A New Word: Wellium

    wellium – n. an excuse you come up with to rationalize a disappointing outcome – telling yourself that you weren’t in the mood for that sold-out show anyway, that your safety school is actually a better fit, that your dream job might have been too stressful.

    I come up with wellium all the time. I think it’s a very human reaction to try and make yourself feel better with some justification of why you are OK something didn’t work out.

    As I’ve gotten older, I do try to just feel bad or disappointed, and then move on. I tell myself that often decisions made by others aren’t necessarily a rejection. Often it can be a preference for something else, or the competition was better.

    It’s OK if others beat you at something if they’re better. That’s what we all want from competitive situations in sports, in jobs, in music. If they win, they win.

    Hopefully that also spurs you to learn to be better.

    From the Dictionary of Obscure Sorrows

  • Using the T-SQL Error Functions–#SQLNewBlogger

    I was working with a customer that was doing some error handling in procs and helped them do some error tracking. As we were working through things, I realized that some of functions working with errors operated differently than I expected.

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

    The Error Functions

    There are a number of error functions available to you in modern SQL Server. We have:

    All of these functions have the same clause in their docs, which says, “ xxx returns NULL when called outside of the scope of a CATCH block.”

    That was something I didn’t realize. I’d assumed I could run this:

    SELECT 1/0
    SELECT ERROR_SEVERITY(), ERROR_MESSAGE(), ERROR_STATE()

    However, if I run this, I get the error, but my results are NULL, NULL, NULL.

    If I want the values, I need to do this:

    BEGIN TRY
       SELECT 1/0
     
    END TRY
    BEGIN CATCH
       SELECT ERROR_SEVERITY(), ERROR_MESSAGE(), ERROR_STATE()
    END CATCH;

    This will return my 16, Divide by zero error encountered., 1

    In general, you ought to be using TRY..CATCH blocks for error handling. We do want to ensure that we are doing our best to deal with problems in code and not just expect all errors will be managed by the application. As much as possible, we should try to gracefully fail and give the application or client something useful.

    Along with TRY..CATCH, learn to use THROW, and ensure you’re adding some error handling to older code. This is an easy refactoring add to existing code, and it’s simple to enhance future code to make it more maintainable.

    SQL New Blogger

    This is a quick look at the functions that capture error information, and noting a limitation I didn’t realize. It’s short, simple, and took me about 10 minutes.

    This is one of those topics that dev managers, especially front end based ones, appreciate. Doing a post on this topic on your blog might get someone to ask you about error handling, and with a little practice (and a few posts), you’ll be able to talk about this topic confidently.

  • The Redgate Summit 2024

    The Redgate Summit tour is coming in 2024 to a number of cities. You can see the list here and register for events, but register soon. I know the tickets are going quickly.

    Years ago we started SQL in the City, and I was thrilled to speak at those events. We had a number of them in the US and UK, and I enjoyed going to some amazing venues to speak. It was a treat, and I think customers really enjoyed these small conferences.

    With our move beyond SQL Server, and beyond SQL as well, we’ve decided to launch new events called Redgate Summits. We also host the annual PASS Data Community Summit, so I’m glad these events are all somewhat themed.

    The 2024 Tour

    In 2024 we have four events scheduled (so far) in these cities:

    • Atlanta (Mar 13)
    • London (Apr 17)
    • Chicago (May 29)
    • NYC (Aug 21)

    I’m also scheduled for some Australian events in early May, but still waiting on them to be announced.

    I’m excited as we’ve set different tracks with a lot of Redgate specific, and general content. We have product specific sessions, thought leadership on trends (cloud, ai, devops, etc.) and deep-dives. I don’t have a final session list, though I’m busy working on content in a few areas. Hopefully more news soon.

    In the meantime, your best bet to secure a ticket is to reach out to your account representative. If you don’t know them, ping sales@red-gate.com and ask who’s assigned. I know they have more pull for tickets than I do Winking smile

    Hope to see you there and watch for more details soon.