AHXproject

Ubuntu => Ubuntu Blog => Topic started by: tim on Feb 07, 2026, 11:18 AM

Title: AI meets SQL Server 2025 on Ubuntu
Post by: tim on Feb 07, 2026, 11:18 AM
AI meets SQL Server 2025 on Ubuntu

Partnership between Microsoft and Canonical

Since 2016, when Microsoft announced its intention to make Linux a first class citizen in its ecosystem, Canonical and Microsoft have been working hand in hand to make that vision a reality. Ubuntu was among the first distributions to support the preview (https://blogs.microsoft.com/blog/2016/03/07/announcing-sql-server-on-linux)  of SQL Server on Linux. Ubuntu was the first distribution (https://learn.microsoft.com/en-us/archive/blogs/wsl/windows-subsystem-for-linux-overview)  offered in the launch of Windows Subsystem for Linux (WSL), and it remains the default (https://learn.microsoft.com/en-us/windows/wsl/install)  to this day. Ubuntu was also the first Linux distribution to support Azure's Confidential VMs (https://docs.microsoft.com/en-us/azure/confidential-computing/quick-create-confidential-vm-portal-amd) .

SQL server has been a cornerstone of the ongoing collaboration to deliver a seamless Linux experience for developers and enterprises alike. Together, we have been able to meet growing customer demands with a number of joint offerings including ready-made and jointly supported configurations (https://azuremarketplace.microsoft.com/en-us/marketplace/apps?filters=linux%3Bmicrosoft&page=1&search=Ubuntu)  for SQL Server on top of Ubuntu. In this article, we'll take a look at our latest collaboration: SQL Server 2025 on Ubuntu.

SQL Server 2025

The General Availability of SQL Server 2025 on Ubuntu 24.04 (https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver17&tabs=ubuntu2004%2C2025ubuntu2204%2Codbc-ubuntu-1804)  is a milestone in our partnership. SQL Server 2025 brings several new features (https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2025?view=sql-server-ver17) , including new AI capabilities such as vector search and external AI models integrations. Here's how you can get up and running with these new capabilities.

Your new AI playground
Deploying a database server instance

Let's start by installing LXD (https://ubuntu.com/lxd) , our Canonical tool to easily manage virtual machines and containers.

sudo snap install lxd
sudo snap list | awk '/lxd/ {print $3}'
sudo lxd init --minimal # configure LXD

Let's now create a virtual machine to serve as a playground:

sudo lxc launch ubuntu:24.04 mssql25 --vm -c limits.cpu=4 -c limits.memory=6GiB -d root,size=24GiB

Next, we will be installing all the pre-requisites to get a SQL Server 2017 running:

sudo lxc exec mssql25 bash
su -l ubuntu
# Like always, we start by updating our packages
sudo apt -y update && sudo apt -y upgrade

# Download and trust the Microsoft key
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

# Register the SQL Server repository
curl -fsSL https://packages.microsoft.com/config/ubuntu/24.04/mssql-server-2025.list | sudo tee /etc/apt/sources.list.d/mssql-server-2025.list

# Ensures new repositories are loaded
sudo apt-get update

# Install SQL server and a password generator
sudo apt-get install -y mssql-server pwgen

Let's now set up the installed SQL Server to get a running instance as follows:

PW="$(pwgen -sB 22 1)" # Generates SQL Server compliant-password
# Prepare some environment variables to setup SQL Server
install -d -m 700 ~/.secrets/sql
install -m 600 /dev/null ~/.secrets/sql/mssql.env

cat > ~/.secrets/sql/mssql.env $src"
fi
done

In my testing virtual machine, the above yields the following Microsoft-provided packages:

msodbcsql18 -> https://packages.microsoft.com/ubuntu/24.04/prod
mssql-server -> https://packages.microsoft.com/ubuntu/24.04/mssql-server-preview
mssql-tools18 -> https://packages.microsoft.com/ubuntu/24.04/prod
packages-microsoft-prod -> https://packages.microsoft.com/ubuntu/24.04/prod

You should only keep trusted sources such as Microsoft and Canonical.  You need also to perform the same checks for all the other types of packages or images you might be using (containers, snaps ...). Unfortunately, many companies might overlook securing the models themselves. Canonical not only provides audited AI models but also ones that are optimized for your infrastructure. Let's look at an example.

Your optimized AI models

Canonical recently announced (https://canonical.com/blog/canonical-releases-inference-snaps)  inference snaps (https://documentation.ubuntu.com/inference-snaps/)  that take advantage of your silicon capabilities (whether CPUs or GPUs) to accelerate your AI workloads.  Here's how you can install one:

sudo snap install qwen-vl --beta
qwen-vl status # Checks it finished successfully

On my machine, I get:

engine: cpu-avx512
endpoints:
openai: http://localhost:8326/v1

You can then use the newly deployed model as follows:

curl http://localhost:8326/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{ "model": "", "messages": [{"role": "user", "content": "Who is the publisher of Ubuntu?"}],
"temperature": 0.7
}' | jq

You should then get a response to the supplied prompt.

Running optimized AI models along Ubuntu Pro and SQL Server provides you with a secure and reliable stack to support your AI workflows. Canonical and Microsoft can help you go further with jointly supported offerings.

Your supported AI playground

We saw together how Canonical and Microsoft help you run an integrated AI stack from the operating system up to the database engine and the AI models. Canonical and Microsoft  deliver prebuilt Azure VM images with pre-configured SQL Server on top of Ubuntu Pro, with support from both companies. We can also help you run highly available and supported SQL Server deployments on top of Ubuntu Pro. Please contact us (https://canonical.com/data#get-in-touch)  for more details.

Partnership between Microsoft and Canonical Since 2016, when Microsoft announced its intention to make Linux a first class citizen in its ecosystem, Canonical and Microsoft have been working hand in hand to make that vision a reality. Ubuntu was among the first distributions to support the preview of SQL Server on Linux. Ubuntu was the [...]


Categories: SQL Server, Ubuntu
Source: https://ubuntu.com//blog/sql-server-2025-on-ubuntu Feb 04, 2026, 04:34 PM