Category: Blog

  • Daily Coping 23 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 look around and spot three things you find unusual or pleasant.

    I was lucky enough to travel recently a few times. One trip was to upstate New York to see my daughter, and I made it a point to look for a few different things. Here are a few things I noticed:

    Cheese Curds

    I don’t see these around Colorado (or many places I travel), but looking for a late night dinner on a drive between cities at 10pm I found multiple bags of these at a small rural gas station. At a few other convenience stores, I saw quite a variety.

    Interesting, and quite tasty.

    Cash Only

    We drove a few towns over to bowl one day. We walked in, got our shoes and a sheet, and proceeded to bowl. The person at the desk said we would settle up later.

    While we were there, my wife went to get a drink and was told that it was cash only. I had some in the car, and again, they said to settle up later.

    It was interesting. They used old fashioned, mechanical cash registers to total our bill and then gave us change for the cash. They trusted us to pay, and I was reminded of times when I was a kid when that was how many businesses ran: cash, trust, and things totaled without electronics.

    I miss those days sometimes.

    Weather

    The weather was rainy, chilly, and damp. The old house we were in was designed early in the 20th century, with older architectural elements, big floor heating ducts from an oil furnace, and a bit of a draft.

    We looked over the weather, on average, for the area. It’s often cloudy, which made us miss Colorado but reminded us to be thankful for all the sun we get. I missed the sun last weekend and am glad to be home.

  • 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.