Daily Coping 20 Jan 2023

Today’s coping tip is to take a different route today and see what you notice.

I’ve had this tip come up a few times and each time I’ve enjoyed looking at the world from a different perspective. I tend to follow the same 4-5 routes over and over, often playing the “how-little-energy-can-I-use-in-the-Tesla” game.

Today I took a new route to coaching practice. I’ve gone this way a few times, but almost never, so I decided to follow along and see what I’d see. In this case, I’m leaving Parker and heading near Centennial Airport in Colorado, but rather than my normal Parker Road to Bronco’s Parkway, I turned off early, went between a few neighborhoods and then threaded through a bunch of new commercial/industrial construction around there.

What I was amazed with was the amount of new construction. I’d seen some new buildings from my normal route, but driving through there it looks like a tremendous amount of new buildings, especially warehouses, being built in a large area that used to be open fields.

Good and bad, but something I noticed for sure.

I started to add a daily coping tip to the SQL Server Central 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.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 20 Jan 2023

Daily Coping 19 Jan 2023

Today’s coping tip is to switch off tech an hour before bedtime.

I read at night often, so this is a challenging one. However, I decided to give this a try, especially as my wife has been reading more lately with less TV.

To fill the time, I decided to put my phone on a charger and play guitar for an hour before turning in. My fingers aren’t quite as ready for this as I would like, so it ended up being a bit of playing, some rest and chatting with my wife, then repeat.

Not sure I love the idea of getting rid of all tech, since I read on a device, but removing most of the distractions from browsers, social media, etc. was nice.

I started to add a daily coping tip to the SQL Server Central 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.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 19 Jan 2023

Connecting to PostgreSQL from Azure Data Studio

I’ve been doing a bit of work with PostgreSQL as part of my work with Redgate. PostgreSQL is a relational platform that is open source, free to use, available as a supported commercial product from various companies, and has been in active development for over 35 years.

More and more organizations are looking at PostgreSQL for relational data stores as both SQL Server and Oracle are very expensive, and this is a viable alternative.

This post looks at the basics of getting started with PostgreSQL by connecting to the platform with Azure Data Studio.

If you haven’t installed PostgreSQL, or want to work with a container, check out my previous post: Creating a PostgreSQL Docker Container with a Volume on Windows

Azure Data Studio

Azure Data Studio (ADS) is a fork of Visual Studio Code, but specialized for databases. I don’t use it a lot, but I find it useful for some coding. They also have added an extension that allows connections to PostgreSQL.

If you click the Extensions blade and then search for postgresql, you’ll find it. You can see it installed on my system below. Before you do this, the button that says uninstall would say install.

2022-12-27 10_26_31-Extension_ PostgreSQL - DBAScripts - Azure Data Studio

Once installed, the connection is like any connection in ADS.

First, make sure you have PostgreSQL installed. If you want to do this in a container, see my link above.

Connecting

To connect, first open a new Query window.

2022-12-27 10_28_43-SQLQuery_2 - disconnected - DBAScripts - Azure Data Studio

At the top there is a “Connect” button. Click this.

2022-12-27 10_28_47-SQLQuery_2 - disconnected - DBAScripts - Azure Data Studio

Now the connection blade opens. As you can see below, there are now two choices for the connection type: SQL Server and PostgreSQL. Choose PostgreSQL.

2022-12-27 10_29_34-Window

I choose localhost, as that’s where my instance is running. I also change the authentication type to Login and enter “postgres” as the default user. If you haven’t set up a user, use this. Then enter the password.

One last thing, as I often run databases in containers, I’ll change the port. To do that for PostgreSQL, click the “Advanced” button. I often use 54320, 54321, 54322 for my ports, so you can see I’ve entered that below:

2022-12-27 10_32_04-SQLQuery_2 - disconnected - DBAScripts - Azure Data Studio

Click Ok if you’re added a port, and you should see these details:

2022-12-27 10_31_49-SQLQuery_2 - disconnected - DBAScripts - Azure Data Studio

Click Connect, and you should connect immediately. Then you can verify your connection with a query or two. As you can see, the database is defaulted to postgres and my queries have returned the version and tables in this database.

2022-12-27 10_35_20-● SQLQuery_2 - localhost.postgres (postgres) - DBAScripts - Azure Data Studio

That’s it. Now time to work on some pgsql.

Posted in Blog | Tagged , , | Comments Off on Connecting to PostgreSQL from Azure Data Studio

Heading Back to VS Live in March 2023

I’m speaking at VS Live in March 2023 for the Las Vegas show. This time it’s at Planet Hollywood, which is a hotel a new place for me. I’m looking forward to seeing lots of friends at the show. I was in Redmond and Austin last year for the VS Live shows and I can’t wait to get back to Las Vegas.

If you want to join me at fun show, register with the code Jones for $500 off the price.

VS Live is a multi technology show. I always learn something interesting there from Brian Randall, Rocky Lhotka, Bob Ward, Andrew Brust or any of the other amazing speakers. There are lots of development sessions, both technical and soft skills, along with a few of us data people delivering talks on how to deal with the database and power your software.

The schedule is up and it looks exciting. A wide variety of talks, including these two from me:

  • Architecting Zero Downtime Database Deployments
  • Adding Graph Structures to your SQL Server Database

There are lots of talented speakers and great topics, so think about kicking off your 2023 development efforts by coming to  VS Live Las Vegas, Mar 19-24, 2023.

Register with the code Jones for $500 off the price.

Posted in Blog | Tagged , , | Comments Off on Heading Back to VS Live in March 2023