我正在连接到 Azure 服务器上的数据库,其中数据库位于不同的服务器上,并且我通过选择选项 Active Directory 和用户凭据选项建立了连接。它在 SQL Server 中工作,但我需要一个连接字符串来连接数据库。有什么建议吗?
最佳答案
如果集成,则使用以下连接字符串:
Data Source=xxxxxxx.database.windows.net; Initial Catalog=xxxxxxx; Authentication=Active Directory Integrated;
如果您使用用户名和密码进行连接:
Data Source=tcp:xxxxxxx.database.windows.net;Initial Catalog=xxxxxxx; Authentication=Active Directory Password; User ID=xxxxxxx; Password=xxxxxxx;
关于sql-server - 使用用户身份验证的 SQL 数据库与 Active Directory 的连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49975592/