HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

Is there a way to use standard CLR functions on Azure SQL Edge for Ubuntu Docker on an M1 Mac?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
sqlubuntudockerwayclredgestandardazureformac

Problem

I have a MacBook with an M1 chip, so (about) the only option for me to run SQL Server is to run it as a Docker container. This works fine for standard SQL, but our application uses some CLR features like COMPRESS; when I try to use that, it tells me

Msg 50000, Level 16, State 1, Line 45
Common Language Runtime(CLR) is not enabled on this instance.

Enabling it does not work:

EXEC sp_configure 'clr enabled', 1;  
RECONFIGURE;  
GO


gives

Msg 15392, Level 16, State 1, Procedure sp_configure, Line 166

The specified option 'clr enabled' is not supported by this edition of SQL Server and cannot be changed using sp_configure.

I found this Stack Overflow post but that is about someone using a custom .NET library; I'm looking for the 'standard' functionality available in SQL Server for Windows.

Solution

You are not alone running SQL Server container images on MacBook Pro M1: and in fact CLR is missing from Azure SQL Edge container images.

However a brave person was able to install SQL Server 2019 on Windows Server 2016 on a M1 Max MacBook Pro by using an emulator called UTM, which itself is an abstraction over QEMU.

The recommended x86_64 architecture is this:

Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-6.1) (q35)


Use it as the basis of your virtual machine and configured it with two CPU cores, 8GB RAM, and a 127GB virtual hard drive.

Code Snippets

Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-6.1) (q35)

Context

StackExchange Database Administrators Q#307157, answer score: 3

Revisions (0)

No revisions yet.