我是一名 .NET 开发人员,也是 mac (m1 pro) 的新手。我使用 docker 并提取azure-sql-edge映像。当我尝试创建包含列的表或在代码优先解决方案生成的类型列geometry中插入值时,遇到以下错误:geometry
此实例上未启用公共语言运行时 (CLR)。
我尝试通过运行启用 CLR exec sp_configure 'clr enabled',1,但遇到以下错误:
此版本的 SQL Server 不支持指定的选项“clrenabled”,并且无法使用 sp_configure 进行更改。
该怎么办?请帮我。
我正在使用配备 M1 CPU 的 MacBook Pro,因此无法使用“普通”mssql docker 映像。我使用的 azure-sql-edge 没有 sqlcmd 来初始化数据库(创建架构、数据库、登录)。
我创建了一个 sql 脚本,我想在容器启动后运行该脚本,但我找不到 sqlcmd 的任何替代方案。
还有其他方法吗?
我一直在尝试在 .net core 6.0 中构建一个应用程序,但在将其连接到在 docker 中运行的 sql Edge 服务器时遇到问题。我一直在 mac 上运行它。
这是我在 appsettings.json 中使用的连接字符串。
"TheatreApiDb":"Server=localhost;Database=Theatre;User=SA;Password=P@ssw0rd;Trusted_Connection=True;"
Run Code Online (Sandbox Code Playgroud)
每当我尝试连接到服务器时,我都会收到此运行时错误。
Microsoft.Data.SqlClient.SqlException: "A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)" ---> System.Security.Authentication.AuthenticationException: "The remote certificate was rejected by the provided RemoteCertificateValidationCallback."
Run Code Online (Sandbox Code Playgroud)
我已经尝试了很多方法来解决这个问题,但无法解决这个问题。
尝试将端口号放入连接字符串中,但没有解析。