Category: Blog

  • Daily Coping 22 Mar 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to get really absorbed in an interesting or creative activity.

    I try to engage in some creative pastimes in my life, but often I don’t have the time to work on them. That’s been especially true lately.

    A couple of nights last week my wife was busy. Rather than read or watch TV, I got my guitar, opened up YouTube, and spent an hour working through learning a song. At least until my fingers were hurting.

    Didn’t completely learn anything, but I did improve some skills and enjoyed the time doing so.

  • Flyway Mistakes

    I have been doing some testing with Redgate’s Flyway Desktop as a new way of managing code for databases. However, just like Git, I appreciate clients, but I want to know how the CLI (command line interface) works. I spent time learning git add, git push, git checkout and more. Now I have more comfort understanding how SourceTree or GitKraken work.

    I wanted to do the same thing with Flyway, just to be sure that I know what the options, switches, and behavior for Flyway operations would be.

    The Scenario

    I had an existing database, and I wanted to play around with adding this to a DevOps flow. I was looking for a basic experiment, and decided to create a new repo. I copied the default flyway.conf file into this folder and changed it.

    The only thing I did was alter the Flyway conf file in my folder to work with SQL Server. I copied the connection string into the flyway.url parameter and set it as follows:

    flyway.url=jdbc:sqlserver://aristotle:1433;instanceName=SQL2017;databaseName=AdventureWorks2017;integratedSecurity=true

    When I ran the info command, it failed.

    fw_fail

    When I ran the same command with a different database, it worked:fw_succeed

    I was highly confused. I tried a number of different databases, and some of them worked, not I couldn’t see a pattern.

    I checked a number of things, including the database owners, a few of which I changed. I thought it might be some permissions and dropped my sysadmin account and added it back.

    I tried connecting with SSMS and with sqlcmd. Both of those tools seemed to work.

    I was really stumped.

    A Small Conflict

    Finally, after a bit of back and forth with a few developers, someone noted that I shouldn’t need the port included in the string. Sure enough, when I removed it, things started working.

    Apparently, the JDBC documentation notes the issue. I kept looking at Flyway docs, but they just pass things along to the JDBC driver from the various parameters and environment variables.

    There is a note that says provide the port number to stop a round trip to the browser to determine the port number for a named instance. If the port number and name are included, the port takes precedence.

    I have two instances, some of which have the same databases on each. The databases that worked were on a different instance (which responds to 1433). The ones that didn’t, weren’t on that instance. I kept examining the \SQL2017 instance, but that wasn’t the one I was logging into with my string.

    A silly mistake, but a good one to note. The port is a higher priority than the instance in a Java connection string.

    I can’t find a priority in the docs for OLEDB or the native client, but they do all say the address takes precedence over the address parameter.

  • Daily Coping 21 Mar 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to stop. Breath. Notice. Repeat regularly.

    Yoga has helped me to appreciate this. I will stop and breathe while coaching, especially at tournaments. I’ve used this as I prep to deliver a session as well. Stop, breathe deep, often raise my arms and stretch.

    I’ve also found this good for focus, or for trying to relax. I’ve written about box breathing, but today I’m taking a few minutes to breathe and look, rather than think about something specific.

    Just breathe, sit, and look out at the world.

  • Daily Coping 18 Mar 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to get outside and notice how the weather feels.

    I haven’t done much of this lately. It was cold in Denver for lots of Feb/Mar, and in London I was busy inside, running from place to place. I did like walking a little outside, but the walks were short.

    I did, however, get a bit of a walk. The train dropped me off at the West side of the ExCel center. My hotel was about a mile away on the East side. I started to a restaurant to get some food, but since they were not open yet, I decided to walk to the hotel. Rather than going back along the North side of ExCel, where the train was, or inside, I took a slightly longer route along the Thames.

    It was a pleasant day, about 50F/10C, a bit of a breeze, but not too bad. I plopped a cap on my head and sunglasses on my face. I walked along, looking at the water and the sites. It was a bit chilly, but invigorating. I had enough clothing to not feel chilled in my core, but the wind and cold air kept me from being too warm.

    I breathed deep, enjoying the sensations of a a wonderful day in London, at least mentally. I wouldn’t want to be outside for a long time, but the walk reminded me to appreciate I wasn’t in a rainy (or snowy) London, and I was in London. One of my favorite cities.

    As a note, I was in Greenwich and it snowed in London. Another not so great day, but one that I appreciated walking around and enjoyed the chilly weather.

    IMG_0909