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.
Search Criteria
Package Details: mssql-server 16.0.4225.2-1
Package Actions
| Git Clone URL: | https://aur.archlinux.org/mssql-server.git (read-only, click to copy) |
|---|---|
| Package Base: | mssql-server |
| Description: | Microsoft SQL Server for Linux |
| Upstream URL: | https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-overview?view=sql-server-ver16 |
| Licenses: | unknown |
| Submitter: | flash2k2 |
| Maintainer: | too |
| Last Packager: | too |
| Votes: | 32 |
| Popularity: | 0.021466 |
| First Submitted: | 2016-11-17 09:25 (UTC) |
| Last Updated: | 2025-12-15 11:11 (UTC) |
Dependencies (16)
- gawk (gawk-gitAUR)
- gdb (gdb-gitAUR)
- glibc (glibc-gitAUR, glibc-eacAUR, glibc-git-native-pgoAUR)
- krb5 (krb5-gitAUR)
- libatomic_ops
- libc++ (libc++-with-libunwindAUR, libc++-msanAUR)
- libldap24AUR
- libunwind (libunwind-carbonAUR, libunwind-gitAUR)
- nss (nss-hgAUR)
- numactl (numactl-gitAUR)
- openssl-1.1AUR
- pam (pam-selinuxAUR)
- sed (sed-gitAUR, uutils-sedAUR)
- sssd (sssd-nosmbAUR, sssd-gitAUR)
- debugedit (debugedit-gitAUR) (optional)
- python-pyodbcAUR (optional)
Required by (4)
- mssql-server-fts
- mssql-tools (optional)
- python-pydal-git (optional)
- shlink (optional)
Sources (1)
TheHardew commented on 2026-04-11 21:31 (UTC) (edited on 2026-04-11 21:31 (UTC) by TheHardew)
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
Pinned Comments
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:
doctorzeus commented on 2023-05-16 10:15 (UTC) (edited on 2023-06-17 03:56 (UTC) by doctorzeus)
This current package is MSSQLServer2022.
For anyone who needs to set the compatibility level of a db to migrate to an older version, see this article:
https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver16
doctorzeus commented on 2023-02-22 22:23 (UTC) (edited on 2024-08-19 04:24 (UTC) by doctorzeus)
NOTES ON libldap 2.4:
Yes there is a newer version in the official repos but the binaries do not run without this version which is listed in the dependencies by Microsoft.
If you have a problem compiling libldapV2.4, go and ask on that package page, not here.
You can get libldap V2.4 here from this AUR package:
https://aur.archlinux.org/packages/libldap24