Learning PostgreSQL: The Tools

AWS, PostgreSQL, RDS
In case you don't know, I've been writing a series of articles over on Simple-Talk as I learn PostgreSQL. It's all from the point of view of a SQL Server person, expanding into a new technology. In other words, a true story. I thought I'd take a moment here on my own blog to talk about the tools I'm using and why I chose those. AWS RDS Let's establish up front, I'm lazy. Very lazy. So yeah, I'm trying to learn this new technology, but I'm going to find as many ways to use the knowledge, skills & tools I already have as I can. Now, I first started learning PostgreSQL because I wanted to learn more about how Flyway works. Further, as I also needed to learn how to…
Read More

PostgreSQL and Azure Data Studio

PostgreSQL
As I've been working more with PostgreSQL, I've found that I'm basically pretty happy just issuing SQL commands to get work done. However, it's handy to have an actual programming environment to work from. A few reasons for this. First, and probably most important, a good programming environment has easy connections to source control. Also, you'll get, hopefully, some help with type-ahead for the code you're writing. Finally, having a visual of the stuff in your database can be handy while working on it, so a GUI is nice. I use Azure Data Studio for most of my PostgreSQL work. Azure Data Studio and PostgreSQL I'm not sure exactly when support for PostgreSQL was added. The two years I've been poking around with PostgreSQL, Azure Data Studio (ADS) has supported…
Read More

Query Plans in Azure Data Studio

SQL Server
I have long been a fan of Azure Data Studio, but one shortcoming has kept me from truly adopting it: Query Plans in Azure Data Studio. Sure, there was a plug-in you could install. Also, you could use a somewhat truncated version of Plan Explorer, but all I wanted was for SQL Server Management Studio plans to be query plans in Azure Data Studio. Go and get version 1.35 of the tool. Right now. DUDE! You have 1.35 of Azure Data Studio? Cool. Now, go to the menu bar. Click on "File." Click on "Preferences". Click on "Settings". Now, type the following into the search box: workbench editor enable preview. You should see this: Check the box below where it says "Workbench > Editor: Enable Preview" just like I have…
Read More

Azure Data Studio Intellisense

SQL Server
I recently saw a question about the Azure Data Studio Intellisense: "Why won't intellisense in Azure Data Studio work with different schemas?" Immediately I thought, "Wait, it does." But, testing is your buddy. Azure Data Studio Intellisense Azure Data Studio Intellisense is on by default. Also, I like it a little better than the one in SSMS because it will start trying to help you, as you type (like a 3rd party software I can't live without). However, they're partly right. Let's say I want 'Person.Address' so I start typing like this: It doesn't know that I have a table named 'Person.Address'. It's trying to be helpful. You can even see how it's doing a form of wild card search, suggesting that maybe 'db_accessadmin' is what I want since it…
Read More

Distributing Jupyter Notebooks

Professional Development, SQL Server
If you're working with the Microsoft Data Platform, you should be, at the least, exploring Azure Data Studio as a new tool in your toolbox. One of the big reasons for this is the inclusion of Jupyter Notebooks. For those who don't know, Jupyter Notebooks are an open source documentation tool that lets you combine text and pictures with live code. From this we can talk about runbooks that you can share with people, lessons in combination with videos, presentations, interactive software documentation and lots more. I'm myopically focused at the moment on Azure Data Studio, but there are a lot of other places and ways to create or consume notebooks. However, I'm going to keep my focus. The issue I'm running into, is distributing the notebooks. Where to go…
Read More

Your First Jupyter Notebook

Tools
In April, I said I was going to start learning Jupyter Notebooks. It's November. Let's get going with your first Jupyter Notebook. A quick aside before we start. I think one of the huge strengths that is going to come out of these things is as a runbook. You can share a notebook with someone, they can run the queries on it against their own systems and return the book, with the results to you. That's going to be extremely useful as a troubleshooting tool, but has all sorts of other functionality as well. I strongly suggest you start learning these things, as I am. Azure Data Studio There are a number of ways to create and consume Jupyter Notebooks, but I want to focus on the functionality around data…
Read More

SQL Server Containers Are Boring

Containers
Not really, but sort of. The beauty of containers, at least in a dev/test environment, is the ability to spin them up while you need them and then throw them away when you're done. Containers give you a bunch of functionality not otherwise available through a VM. However, once you've spun up a container, they're so dull. Why Are Containers Boring Grant? I'm so glad you asked. Last week I was presenting at SQLIntersection (great show, you should consider attending). I was talking about Query Store in SQL Server 2019. One person in the audience asked, "Can Query Store run inside a container?" I responded, "Great question, let's check." I then switched over to VS code to show this: docker run ` --name DemoSharedVol ` -p 1460:1433 ` -e "ACCEPT_EULA=Y"…
Read More

Learning Jupyter Notebooks

Azure, Professional Development, Tools
I'm starting the process of learning how to use Jupyter Notebooks. Notebooks are documents that contain live code, commentary, results, pictures and more. Jupyter Notebooks are used for presentations, documentation, run books, troubleshooting guides and lots more. Their support within Azure Data Studio opens up lots of opportunities. Azure Data Studio If you're interested in learning about notebooks yourself, or, as I publish the notebooks that I put together and you want to consume them, you need to have a mechanism. There are any number of third party or open source solutions to read notebooks. However, since I'm focused primarily on the Microsoft data platform, I'm using Azure Data Studio to do this work. I've written in the past about using Azure Data Studio (ADS). I also have a bunch…
Read More

How Do You Export A Database in Azure Data Studio

SQL Server, SQL Server 2016, SQL Server 2017
I've been writing a bunch about Azure Data Studio. I've also been recording videos on the topic. A comment I received recently asked how to export a database from Azure Data Studio. It made me want to explore the topic of exporting a database as it relates to Azure Data Studio. Export? When we say export, what exactly do we mean. It could be as simple as exporting data to a flat file for consumption in Excel or something. It could be creating a backup. Maybe we mean creating a bacpac file. We could also be looking at creating individual scripts for objects within the database. Finally, what about a full export of the database object definitions? Any or all of these could be what the question was about. So,…
Read More

Installing Extensions to Azure Data Studio

Azure, SQL Server 2016, SQL Server 2017, T-SQL
If you're even thinking about experimenting with, let alone actively using, Azure Data Studio, you need to plan on installing a few extensions. Buck Woody has a great list that you should look through in this blog post. If you're just getting started with Azure Data Studio, I have an introduction here. Depending on the extension, this could be a simple as a mouse click. However, not all the extensions are that easy. Let's explore this just a little so when you do start using Azure Data Studio, things are easy. Extension From a Mouse Click For this bit of the blog post, we'll stick to nothing but mouse clicks, but, if you really want to bring the power within Azure Data Studio, you really need to learn keyboard shortcuts…
Read More