首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >查看SQL数据库上的锁- Azure

查看SQL数据库上的锁- Azure
EN

Stack Overflow用户
提问于 2017-05-27 18:39:29
回答 1查看 201关注 0票数 1

我正在将SQL连接到一个PHP网站(两者都在Azure上),

PHP中的一切似乎都很好,连接字符串也很完美。

当我试图连接到数据库时,它连接并执行所有操作,但当我试图连接到另一个数据库时,它会显示以下错误。

代码语言:javascript
复制
Array (
  [0] => Array (
    [0] => 08001
    [SQLSTATE] => 08001
    [1] => 5
    [code] => 5
    [2] => [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [5].
    [message] => [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [5].
  )
  [1] => Array (
    [0] => HYT00
    [SQLSTATE] => HYT00
    [1] => 0
    [code] => 0
    [2] => [Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
    [message] => [Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
  )
  [2] => Array (
    [0] => 08001
    [SQLSTATE] => 08001
    [1] => 5
    [code] => 5
    [2] => [Microsoft][ODBC Driver 11 for SQL Server]A network-related or
          instance-specific error has occurred while establishing a
          connection to SQL Server. Server is not found or not accessible.
          Check if instance name is correct and if SQL Server is configured
          to allow remote connections. For more information see SQL Server
          Books Online.
    [message] => [Microsoft][ODBC Driver 11 for SQL Server]A network-related
        or instance-specific error has occurred while establishing a
        connection to SQL Server. Server is not found or not accessible.
        Check if instance name is correct and if SQL Server is configured to
        allow remote connections. For more information see SQL Server Books
        Online.
    )
  )

而且,我还看到数据库上的签名没有连接。

此锁不会出现在连接成功的数据库上。

此外,这三个数据库(两个数据库和一个Web )都在相同的资源组上。

我使用连接字符串连接两个数据库,存储在网站的应用程序设置中。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-05-29 07:12:01

实际上,这是TDE (透明数据加密)图标,而不是Lock签名。见使用Azure SQL数据库的透明数据加密

根据上面的错误消息,造成此问题的最可能原因是您使用的服务器名称不正确。下面是一些解决此问题的建议:

  1. 确保连接字符串中的主机名与Azure门户中的服务器名称完全相等。

  1. 使用PHP的示例代码测试是否可以建立连接。别忘了用你自己的密码来代替。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44220432

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档