HomeBlog
jondarrer.com
HomeBlog
RO
Loading...

Learnings 8-12 March 2021

Things I've learned from work the week of 8th to 12th March 2021

Using
SQL Server Docker image on Apple Silicon M1 machines doesn't work
, but the Azure SQL Edge image is an alternative

When trying to run the SQL Server
microsoft/mssql-server-linux
Docker image on my M1 Mac mini, I get the following error in the logs, with the container shutting down immediately afterwards:

This program has encountered a fatal error and cannot continue running.
The following diagnostic information is available:

       Reason: 0x00000003
      Message: result == 0
   Stacktrace: 00000040000573fe 0000004000056f90 0000004000036d81
               00000040000377af 000000400004cc51 00000040000295df
               000000400490d830 00000040000269a9
      Process: 9 - sqlservr
       Thread: 9
  Instance Id: 3007acb7-9dce-4ad3-910c-1bf88bdbdc4c
     Crash Id: 137bac92-3cd9-4014-a36b-eab2a5e201f5
  Build stamp: 7d599fe53e35b5a1b0c8a5e4185d8b7334e01a8c5fa77540415502a85f37ef27

Capturing core dump and information...
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
Attempting to capture a dump with paldumper
WARNING: Capture attempt failure detected
Attempting to capture a filtered dump with paldumper
WARNING: Attempt to capture dump failed.  Reference /var/opt/mssql/log/core.sqlservr.9.temp/log/paldumper-debug.log for details
Attempting to capture a dump with gdb

This is a
known issue, and at the time of writing, there is no fix
. However, there is a work-around, which involves using the
mcr.microsoft.com/azure-sql-edge
.
Azure SQL Edge
is built on the SQL Database Engine and supports both x86_64 and ARM64 architectures. However, it supports only a subset of feature found in SQL Server 2019 on Linux, so it does not cover every use-case. For example, the following features are
not
supported:

  • Full-text indexes
  • Replication
  • AD integration
  • Linked servers
  • CLR assemblies
  • Etc.

So, your command-line could be:

docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge

Or your Dockerfile:

FROM mcr.microsoft.com/azure-sql-edge:latest

ENV ACCEPT_EULA 1
ENV MSSQL_SA_PASSWORD yourStrong(!)Password

EXPOSE 1433