我正在尝试通过将连接字符串保存在 Azure Key Vault 中,在数据工厂中使用 AD 身份验证(托管标识)连接到 Azure SQL DB。我通过提供对 ADF(ADF 名称)的访问权限在 Azure SQL DB 中设置了托管标识访问权限。我已按以下格式将连接字符串存储在 Key Vault 中,但没有成功。
尝试了以下格式的连接字符串:
Server=tcp:xxxxxxxxxx.database.windows.net;Initial Catalog=xxxxxxx;Authentication = 'Active Directory Interactive';
Server=tcp:xxxxxxxxxxxx.database.windows.net;Initial Catalog=xxxxxxxxxxx;User ID=DatafactoryName;Authentication = 'Active Directory Interactive'; -- Actual DatafactoryName
Server=tcp:xxxxxxxxxxxxxx.windows.net;Initial Catalog=xxxxxxxxx;User ID=MSI_ID;Authentication = 'Active Directory Interactive'; -- Actual MSI ID for the DataFactory
Server=tcp:xxxxxxxxxxxxxx.windows.net;Initial Catalog=xxxxxxxxx;User ID=a;Authentication = 'Active Directory Interactive'; -- Tried arbitrary value
我收到以下错误
答案 0 :(得分:0)
你可以试试
Integrated Security=False;Encrypt=True;Connection Timeout=30;Data Source=xxxxxxxxxx.database.windows.net;Initial Catalog=xxxxxxx
答案 1 :(得分:0)
连接字符串应该是:
Data Source=tcp:<servername>.database.windows.net,1433;Initial Catalog=<databasename>;Connection Timeout=30
参考:Managed identities for Azure resources authentication 和 Reference secret stored in key vault