Package Details: mssql-server 17.0.5005.3-1

Git Clone URL: https://aur.archlinux.org/mssql-server.git (read-only, click to copy)
Package Base: mssql-server
Description: Microsoft SQL Server 2025 for Linux
Upstream URL: https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-overview?view=sql-server-ver17
Licenses: LicenseRef-Microsoft-SQL-Server-EULA
Submitter: flash2k2
Maintainer: too
Last Packager: too
Votes: 32
Popularity: 0.003578
First Submitted: 2016-11-17 09:25 (UTC)
Last Updated: 2026-09-27 17:41 (UTC)

Pinned Comments

too commented on 2026-09-13 09:21 (UTC) (edited on 2026-09-13 09:33 (UTC) by too)

Upgrading from 2022 (16.x) to 2025 (17.x)

This is a true in-place upgrade. The data directory stays at /var/opt/mssql and nothing needs to be detached, exported or reattached. Following Arch practice the package does not start, stop or restart mssql-server, so installing it converts nothing on its own.

The conversion happens the next time you start the engine. It rewrites every database (master, msdb, model and all user databases) from on-disk version 957 to 998, and that is one-way: 16.x can no longer open those files afterwards and aborts with a fatal error. There is no downgrade path and no side-by-side operation, because /opt/mssql and /var/opt/mssql are fixed locations.

Database compatibility levels are preserved, so existing databases keep the behaviour they had and logins in master survive. Only the physical file format moves. You can raise the compatibility level later, separately, if you want to.

If the engine is running when you upgrade, it carries on unaffected: it holds the previous version's binaries open on disk and keeps using them until you restart it. That gives you a window to take a rollback point while the data can still be read by the old engine.

sudo systemctl stop mssql-server
sudo tar -C /var/opt --zstd -cf ~/mssql-pre-upgrade.tar.zst mssql
sudo systemctl start mssql-server
sudo journalctl -u mssql-server -f

Restoring that archive over /var/opt/mssql is a verified way back to 16.x. Note that an enabled unit will also convert at the next boot, so do not rely on the service simply being stopped as a safeguard.

Troubleshooting: "Unable to set persistent hive root"

If the engine fails to start with Unable to set persistent hive root and Last errno: 13 / Permission denied, something has left files in the SQLPAL registry hive owned by a user other than mssql. Check with:

sudo find /var/opt/mssql \! -user mssql

The usual cause is running /opt/mssql/bin/sqlservr by hand as your own user while being a member of the mssql group. The engine initialises its registry hive during startup, before it parses arguments, so even sqlservr --help is enough to rewrite /var/opt/mssql/.system/system/*.hiv as you. Fix with:

sudo chown -R mssql:mssql /var/opt/mssql

The older advice to create /var/opt/mssql/hk no longer applies. The 2025 engine never references that path; the hive lives in /var/opt/mssql/.system and is created automatically.

Latest Comments

1 2 3 4 5 6 .. 14 Next › Last »

too commented on 2026-09-13 09:21 (UTC) (edited on 2026-09-13 09:33 (UTC) by too)

Upgrading from 2022 (16.x) to 2025 (17.x)

This is a true in-place upgrade. The data directory stays at /var/opt/mssql and nothing needs to be detached, exported or reattached. Following Arch practice the package does not start, stop or restart mssql-server, so installing it converts nothing on its own.

The conversion happens the next time you start the engine. It rewrites every database (master, msdb, model and all user databases) from on-disk version 957 to 998, and that is one-way: 16.x can no longer open those files afterwards and aborts with a fatal error. There is no downgrade path and no side-by-side operation, because /opt/mssql and /var/opt/mssql are fixed locations.

Database compatibility levels are preserved, so existing databases keep the behaviour they had and logins in master survive. Only the physical file format moves. You can raise the compatibility level later, separately, if you want to.

If the engine is running when you upgrade, it carries on unaffected: it holds the previous version's binaries open on disk and keeps using them until you restart it. That gives you a window to take a rollback point while the data can still be read by the old engine.

sudo systemctl stop mssql-server
sudo tar -C /var/opt --zstd -cf ~/mssql-pre-upgrade.tar.zst mssql
sudo systemctl start mssql-server
sudo journalctl -u mssql-server -f

Restoring that archive over /var/opt/mssql is a verified way back to 16.x. Note that an enabled unit will also convert at the next boot, so do not rely on the service simply being stopped as a safeguard.

Troubleshooting: "Unable to set persistent hive root"

If the engine fails to start with Unable to set persistent hive root and Last errno: 13 / Permission denied, something has left files in the SQLPAL registry hive owned by a user other than mssql. Check with:

sudo find /var/opt/mssql \! -user mssql

The usual cause is running /opt/mssql/bin/sqlservr by hand as your own user while being a member of the mssql group. The engine initialises its registry hive during startup, before it parses arguments, so even sqlservr --help is enough to rewrite /var/opt/mssql/.system/system/*.hiv as you. Fix with:

sudo chown -R mssql:mssql /var/opt/mssql

The older advice to create /var/opt/mssql/hk no longer applies. The 2025 engine never references that path; the hive lives in /var/opt/mssql/.system and is created automatically.

TheHardew commented on 2026-04-11 21:31 (UTC) (edited on 2026-04-11 21:31 (UTC) by TheHardew)

Unable to set persistent hive root can also mean you run sqlservr with root (like sudo strace...) and the ownership of some directories was changed in /var/opt/mssql, so check that.

too commented on 2025-12-15 11:19 (UTC)

Latest SQL Server 2025 packages are currently available at https://packages.microsoft.com/rhel/9.0/mssql-server-2025/Packages/m/ and https://packages.microsoft.com/ubuntu/22.04/mssql-server-2025/pool/main/m/mssql-server/

These require openssl-3.0 and libldap-2.5.

There is no AUR package for a legacy openssl-3.0 build (undefined symbol: EVP_md2, version OPENSSL_3.0.0).

There are preview versions available for more recent Ubuntu/Red Hat, waiting for a final releases for modern rhel/ubuntu version which will hopefully work with OpenSSL legacy module.

Alternative would be to make openssl-3.0 build right now.

too commented on 2025-10-20 16:19 (UTC) (edited on 2025-10-20 16:20 (UTC) by too)

If the SQL Server does not start and the error is "Unable to set persistent hive root", create a root path for the SQLPAL registry hive:

mkdir /var/opt/mssql/hk && chown mssql:mssql /var/opt/mssql/hk

colorfulsing commented on 2025-04-01 23:30 (UTC) (edited on 2025-04-01 23:32 (UTC) by colorfulsing)

For anyone trying to use this package, here are the steps to install and setup the whole thing:

Step 1: Install this package, I like to use yay so the command would be:

$ yay -Syy mssql-server

Step 2: Execute the Microsoft SQL Server one time setup using mssql-conf and fill whatever it asks:

# Stuff it will ask you:
#  - Select option 2 for development version
#  - Accept terms and conditions
#  - Select your language if prompted
#  - Set admin user "sa" password (equivalent to root/admin user)

$ sudo /opt/mssql/bin/mssql-conf setup

Step 3: The service should now be up and running, so let's check it out:

$ systemctl status mssql-server.service

Step 4: Finally, use a Microsoft SQL Server compatible client or GUI to try to connect and do your stuff with your new database. I like DBeaver, so here is the install command in case you want to use it too:

# if you like to install using pacman:
sudo pacman -Syy dbeaver

# or, if you prefer to install using pamac:
sudo pamac install dbeaver

Step 5: If you decided to use DBeaver like me here is a small step by step guide to connect to your new DB as a bonus:

a. Database -> New Database Connection
b. Scroll down and look for the Microsoft SQL Server logo, click on it to select it and click Next.
c. Fill the connection info:
       i. The hostname leave it as "localhost".
      ii. Port should be 1433.
     iii. Database/schema leave it as "master".
      iv. Username should be "sa".
       v. Fill the password you created on "Step 2" when setup your DB server.
d. Hit Finish
e. Now your server connection should show up in the left sidebar with the name "master".
f. Click on the arrow in the left of "master" and it will prompt you with a one time Download drivers window.
g. Hit Download/Next and it will download the drivers for you
h. Success! Now you can expand your db to navigate and do whatever you need to do.

You're welcome! :)

XcroatoanX commented on 2024-05-15 07:21 (UTC) (edited on 2024-05-15 07:23 (UTC) by XcroatoanX)

Hey, I have installed MSSQL. When I am trying to run the server with systemctl, it gives an error:

× mssql-server.service - Microsoft SQL Server Database Engine
     Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; preset: disabled
)

 Active: failed (Result: exit-code) since Wed 2024-05-15 09:14:59 CEST; 3s ago

   Duration: 2.793s

       Docs: https://docs.microsoft.com/en-us/sql/linux

    Process: 8606 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=18)

   Main PID: 8606 (code=exited, status=18)

        CPU: 3.775s

May 15 09:14:59 archlinux systemd[1]: mssql-server.service: Scheduled restart job, restart counter is at 3.

May 15 09:14:59 archlinux systemd[1]: mssql-server.service: Start request repeated too quickly.

May 15 09:14:59 archlinux systemd[1]: mssql-server.service: Failed with result 'exit-code'.

May 15 09:14:59 archlinux systemd[1]: Failed to start Microsoft SQL Server Database Engine.

May 15 09:14:59 archlinux systemd[1]: mssql-server.service: Consumed 3.775s CPU time, 664.6M memory peak, 0B memory swap peak.

Azad commented on 2024-05-14 10:38 (UTC)

I can't install mssql-server because libldap24 giving this error:

checking for compatible POSIX regex... no configure: error: broken POSIX regex! ==> ERROR: A failure occurred in build(). Aborting...

I tried to download and install libldap24 from aur first but its returning same error

topslick commented on 2024-03-20 19:50 (UTC)

mssql-server 16.0.4115.5-1 runs on linux kernel 6.8.1-arch1-1 big thanks !

lfpuhl commented on 2024-03-19 12:38 (UTC) (edited on 2024-03-19 13:52 (UTC) by lfpuhl)

Current link to download the rpm package https://pmc-geofence.trafficmanager.net/rhel/8/mssql-server-2022/Packages/m/mssql-server-16.0.4115.5-2.x86_64.rpm?geofence=true

SupremeDeity commented on 2024-03-16 14:45 (UTC)

Source seems to be down? For now I am using the actual link from packages.microsoft.com