Skip to content

SQL Server Tools: First steps with go-sqlcmd tool on Windows Server 2022

As you know, with the new version of SSMS since the version 18, the tools like sqlcmd are no more included in the installation.

You need to download separately the tools that you need here

Few months ago, Microsoft announces the replacement of the “old” sqlcmd with a new version called go-sqlcmd.

This new version includes all parameters from the “old” sqlcmd but also new parameters such as the connection to the Azure Active Directory authentication. Following my curiosity and the Microsoft Learn article on this new tools, I begin with the installation.

Installation

The article is very clear about the installation, and I just follow the steps.

Step 1: Check if Winget is installed

Questions about your own setup? A dbi services consultant can look at your case.

Talk to an expert (opens in a new tab)

My Test VM is under Windows Server 2022 and I run a cmd session:

I have the message “winget is not recognized as an internal command”. This means that Winget is not install and need to be download here

After this step, following the error, I download the Microsoft.UI.Xaml.2.7…

I install this package and winget but when I check, winget is not recognized…

Ok, no Problem, I google… And finally find this great and useful article from Andreas Nick:

Install WinGet and AppInstaller on Windows Server 2022

Following all steps explained in the blog, I finally success to install Winget…

Step 2: Install go-sqlcmd

To install go-sqlcmd, i run the command: winget install sqlcmd

It’s very quick and you just need at the end to confirm the agreements terms after reading it like usual…

And after the download, the package is installed on my VM under Windows Server 2022

Step 3: Verify the installation

To verify the installation, reopen a new CMD windows and type sqlcmd:

You can see that I have the error “The system cannot find the file specifified“.
At this point and following the documentation, I type sqlcmd –help:

You can see in Feedback the go-sqlcmd to confirm the installation.
These steps already take a lot of time and I stop the blog at this point.
I hope this blog can help you during your testing…

See you soon for the next steps and the real testing of the go-sqlcmd!

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Stéphane Haby

Stéphane Haby

Stéphane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.View Author posts

182 posts since April 2011

Leave a Comment

Your email address will not be published. Required fields are marked *