SQLServerCentral Editorial

Azure Data Studio and Deployment Notebooks

,

Azure Data Studio (ADS) is a cross-platform tool that you can use to run T-SQL queries much as you have done using SQL Server Management Studio. No, the databases do not need to be hosted in Azure; the tool works fine for on-premises SQL Servers as well.

I’ve started using ADS more as I teach T-SQL to students who are not all running Windows. Still, I won’t convert over completely for now because not all the functionality found in SQL Server Management Studio is available in ADS. ADS is extensible, though, and Microsoft has also published information about creating extensions for enhanced functionality.

If you haven’t taken a look at ADS yet, you might want to take it for a spin because there are some cool features to discover. One of my favorites is SQL Server Notebooks. Based on Jupyter Notebooks, they are a way to combine documentation and code in one document. You run the code right inside the notebook! (Take a look at this article from Ed Pollack to get started.)

The T-SQL query results show up in a grid as you would expect, and you can send the notebook to a colleague with or without the results included. In addition to T-SQL, there are several other supported languages for the code blocks such as Python and PowerShell. They are useful for things like training, documentation, demonstrations, run books, troubleshooting guides, and more.

Even after working with ADS and the notebooks frequently in the past couple of months, I forgot about an exciting feature: automatic creation of a notebook for certain deployments.

To get to this feature, look for the ellipsis at the top of the Connections window. Clicking it brings up the New Deployment choice. At the time of this writing, there are three options in the dialog that appears: SQL Server on Windows, SQL Server container image, and SQL Server Big Data Cluster (BDC).

At least for now, the SQL Server on Windows choice just downloads and launches the installer. After that, it looks like you do a typical manual install. The other two choices first check for prerequisites. For example, you must have Docker running to use the SQL Server container image choice. After the prerequisites are in place, you answer a few questions and create the notebook.

Once you have the notebook, you can review it, maybe just learning about the commands needed or you can run it. I’ve only tried out the SQL Server container notebook, and I am happy to say that it worked! Once the code was done and the container was created, a link appeared that let me connect automatically to the instance. There were also commands at the bottom of the notebook to stop and remove the container. This is perfect for my future students, even if they are running Ubuntu or macOS.

I’m excited about this feature, and I can’t wait to see what else Microsoft has in store for ADS and SQL Server notebooks!

 

 

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating