使用Azure托管服务标识与ODBC驱动程序17 for SQL Server [英] Using Azure Managed service identity with ODBC Driver 17 for SQL Server

查看:132
本文介绍了使用Azure托管服务标识与ODBC驱动程序17 for SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am trying to use Authentication=ActiveDirectoryMsi on Azure App service with enabled

Azure托管服务标识(已生成系统)。我收到此错误。

Azure Managed service identity (system generated). I am getting this error.

Azure App Service上安装的驱动程序版本是否太旧了?

Is the driver version installed on the Azure App Service is too old?

连接字符串:

Driver = {ODBC Driver 17 for SQL Server}; Server =< server here> ;; Authentication = ActiveDirectoryMsi; Database =< db here> ;; Encrypt = yes; TrustServerCertificate = no; Connection Timeout = 30; MARS_Connection = yes; Regional = no; QuotedId = yes; AutoTranslate = no; APP = TodoApp; AnsiNPW = yes; ColumnEncryption = Enabled;

Driver={ODBC Driver 17 for SQL Server};Server=<server here>;Authentication=ActiveDirectoryMsi;Database=<db here>;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;MARS_Connection=yes;Regional=no;QuotedId=yes;AutoTranslate=no;APP=TodoApp;AnsiNPW=yes;ColumnEncryption=Enabled;

错误消息:

[SQL Server的ODBC驱动程序17]为连接字符串属性'Authentication指定的值无效'

[ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'Authentication'




推荐答案

只是为了澄清,是吗?参考任何Azure文档的步骤?什么时候你收到这个错误?

确保正确添加连接字符串:




az webapp config connection-string set --resource-group myResourceGroup --name< app name> --settings MyDbConnection ='Server = tcp:< server_name> .database.windows.net,1433; Database =< db_name> ;;' - connect-string-type SQLAzure

ODBC使用的连接字符串具有以下语法:

connection-string :: = empty-string [;] | attribute [;] |属性; connection-string 

查看文档'教程:使用托管标识从App Service保护Azure SQL数据库连接'
for有关此主题的更多详细信息。


这篇关于使用Azure托管服务标识与ODBC驱动程序17 for SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆