【问题标题】:Connection string of SQL database with Active Directory using user authentication使用用户身份验证的 SQL 数据库与 Active Directory 的连接字符串
【发布时间】:2018-04-23 07:30:46
【问题描述】:

我正在连接到 Azure 服务器上的数据库,其中数据库位于不同的服务器上,并且我通过选择 Active Directory 选项和用户凭据选项建立了连接。它在 SQL 服务器中工作,但我需要一个连接字符串来连接数据库。有什么建议吗?

【问题讨论】:

    标签: sql-server azure active-directory database-connection


    【解决方案1】:

    如果集成,则使用以下连接字符串:

    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;
    

    参考: https://github.com/Huachao/azure-content/blob/master/articles/sql-database/sql-database-aad-authentication.md#7-connect-to-your-database-by-using-azure-active-directory-identities

    【讨论】:

      【解决方案2】:

      您还可以通过 Azure 门户找到连接字符串:

      希望这会有所帮助。

      【讨论】:

      • 这对你有用吗?如果您需要更多帮助,请告诉我,如果这对您有帮助,请不要忘记accept作为答案,以便其他社区成员受益,谢谢:)
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-17
      • 1970-01-01
      • 2012-08-29
      • 2018-09-21
      • 2011-01-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多