指定的选项“clr启用” Azure SQL Edge 不支持
我是一名 .NET 开发人员,也是 mac (m1 pro) 的新手。我使用 docker 并提取 azure-sql-edge 映像。当我尝试创建包含 geometry
列的表或在代码优先解决方案生成的 geometry
类型列中插入值时,遇到以下错误:
此实例上未启用公共语言运行时 (CLR)。
我尝试通过运行 exec sp_configure 'clrenabled',1
来启用 CLR,但遇到以下错误:
此版本不支持指定的选项“clrenabled” SQL Server 且无法使用 sp_configure 进行更改。
该怎么办?请帮我。
I'm a .NET developer and new to mac (m1 pro). I use docker and pull the azure-sql-edge image. When I try to create a table with a geometry
column or insert a value in the geometry
type column that was generated by code first solution, I encounter the error below:
Common Language Runtime(CLR) is not enabled on this instance.
I tried to enable CLR by running exec sp_configure 'clr enabled',1
, but encountered the error below:
The specified option 'clr enabled' is not supported by this edition of
SQL Server and cannot be changed using sp_configure.
What to do? Please help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
基于 CLR 的功能 — 是否是实例级“CLR 集成”选项(支持自定义/用户创建的程序集);数据类型
geometry
、geography
和hierarchyid
;内置函数,例如COMPRESS
、DECOMPRESS
、FORMAT
、AT TIMEZONE
;或一些其他功能 - 在 Azure SQL Edge 中不可用。没有办法解决这个问题(至少目前没有)。如果需要任何此功能,则不能选择使用 Azure SQL Edge 作为平台。 (是的,这有点糟糕,但事情就是这样。)PS 基于 CLR 的数据类型和内置函数不通过
sp_configure 'clrenabled'
控制。如果它们在平台上可用,则无法禁用它们(除了启用光纤模式/轻量级池之外,这不是任何人都应该做的事情)。CLR-based functionality — whether it be the instance-level "CLR Integration" option (which enables custom / user-created assemblies); data types
geometry
,geography
, andhierarchyid
; built-in functions such asCOMPRESS
,DECOMPRESS
,FORMAT
,AT TIMEZONE
; or a few other features — are not available in Azure SQL Edge. There is no way around this (at least not at this time). If any of this functionality is required, then using Azure SQL Edge as a platform is not an option. (Yeah, it kinda sucks, but that's how it goes.)P.S. The CLR-based data types and built-in functions are not controlled via
sp_configure 'clr enabled'
. If they are available on the platform, then they cannot be disabled (outside of enabling fiber-mode / lightweight pooling, which is not something anyone should do).Mac Silicon 用户的解决方法:
注意:
A workaround for Mac Silicon users:
docker run --name SQLExpress2019 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=yourStrong(!)Password" -e "MSSQL_PID=Express" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
NOTES:
正如 SQL2019 映像中其他人所建议的,CLR 支持
如果此运行命令不起作用(当然应该如此),那么:
Docker website ->搜索“Azure SQL Edge”-> Microsoft 的“Azure SQL Edge”官方 ->在这里您将找到运行命令。
复制命令并在命令中进行更改,即必须提及末尾“mcr.microsoft......”,将其替换为“mcr.microsoft.com/mssql/server:2019-latest”
As suggested by others in the SQL2019 image CLR is supported
If this run command doesn't work(it definitely should though) then:
Docker website -> Search 'Azure SQL Edge' -> 'Azure SQL Edge' official from Microsoft -> Here you will find the run command.
Copy the command and make a change in the command i.e towards the end 'mcr.microsoft......' must be mentioned, replace it with 'mcr.microsoft.com/mssql/server:2019-latest'