无法打开登录请求的服务器
Cannot open server requested by the login
我正在尝试使用 pyodbc 连接到我的 Azure SQL 数据库。我正在使用的 azure 帐户位于用户名 xxxxxx@student.bham.ac.uk(我的大学帐户)下。当我尝试连接到数据库时,出现错误
Cannot open server "student.bham.ac.uk" requested by the login. The login failed. (40532)
.
我使用的凭据是正确的。该错误让我觉得它可能会混淆我对数据库服务器的登录?这个错误是什么意思,我该如何解决这个问题?
This 似乎对我有用:
If your SQL Database server is called myazureserver and your login is user@example.com, then you must supply your login as user@example.com@myazureserver.
我最近遇到了同样的问题,我是这样解决的:
- 转到您在 Azure 上的 SQL 服务器资源
- 转到“防火墙和虚拟网络”
- 验证“允许 Azure 的服务和资源访问此服务器”设置为是
保存更改并等待最多 5 分钟来应用此更改。
Hdot 所说的对我也适用
If your SQL Database server is called myazureserver and your login is user@example.com, then you must supply your login as user@example.com@myazureserver.
但是,值得一提的是,如果您使用 DBeaver,则必须在 'Driver Properties' 选项卡(而不是 'Main')中更新 USER 和 PASSWORD。这真的很令人困惑。
我正在尝试使用 pyodbc 连接到我的 Azure SQL 数据库。我正在使用的 azure 帐户位于用户名 xxxxxx@student.bham.ac.uk(我的大学帐户)下。当我尝试连接到数据库时,出现错误
Cannot open server "student.bham.ac.uk" requested by the login. The login failed. (40532)
.
我使用的凭据是正确的。该错误让我觉得它可能会混淆我对数据库服务器的登录?这个错误是什么意思,我该如何解决这个问题?
This 似乎对我有用:
If your SQL Database server is called myazureserver and your login is user@example.com, then you must supply your login as user@example.com@myazureserver.
我最近遇到了同样的问题,我是这样解决的:
- 转到您在 Azure 上的 SQL 服务器资源
- 转到“防火墙和虚拟网络”
- 验证“允许 Azure 的服务和资源访问此服务器”设置为是
保存更改并等待最多 5 分钟来应用此更改。
Hdot 所说的对我也适用
If your SQL Database server is called myazureserver and your login is user@example.com, then you must supply your login as user@example.com@myazureserver.
但是,值得一提的是,如果您使用 DBeaver,则必须在 'Driver Properties' 选项卡(而不是 'Main')中更新 USER 和 PASSWORD。这真的很令人困惑。