sql-server - 不允许具有 IP 地址的客户端访问服务器 Azure SQL 数据库

标签 sql-server azure

当我尝试连接到我的免费试用帐户的 Azure SQL 数据库时,遇到以下错误。谁能帮助我如何在我的免费试用帐户中设置规则?我没有看到任何设置它们的选项。

Cannot open server 'ccaausprddb001' requested by the login. Client with
IP address '125.16.236.150' is not allowed to access the server.  To enable 
access, use the Windows Azure Management Portal or run sp_set_firewall_rule on 
the master database to create a firewall rule for this IP address or address 
range.  It may take up to five minutes for this change to take effect. 
ClientConnectionId:f1ce6d56-c321-4458-a8dc-507f40e24108
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server 'ccaausprddb001' requested by the login. Client with IP address '125.16.236.150' is not allowed to access the server.  To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.  It may take up to five minutes for this change to take effect.

最佳答案

可以通过配置 SQL 数据库所在的 Azure SQL Server 的防火墙来解决此问题。我正在使用新的 Microsoft Azure 门户。请看下面的截图, Selecting the SQL server from the listed resources 请记住,您需要在 SQL Server 中配置防火墙并管理 IP 地址,而不是在 SQL 数据库中。

选择 SQL Server 后,

  • 点击设置 -> 防火墙
  • 系统会要求您添加新规则。
  • 添加名称并输入要访问的 IP 地址(或范围) 数据库。注意:Azure 会自动检测您当前的 IP。

Follow these steps

等待 5 分钟即可开始。我希望这会有所帮助。

关于sql-server - 不允许具有 IP 地址的客户端访问服务器 Azure SQL 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34760223/

相关文章:

php - 根据 mysql 查询显示某些代码? (php)

azure - 访问应用服务中的 Azure MSI IMDS 终结点时出现错误 'unable to connect to the remote server'

angularjs - asp.net web api 2 CORS和身份验证授权配置

java - 在 azure 上成功部署 restful api 但当我遇到 url 时总是返回 404 错误

sql-server - SQL Server : permissions to read database diagrams

sql - 将所有序列的序列更改为具有最大 ID 的所有列

sql-server - 随时随地的新唯一标识符

mysql - SQL 使用两列索引或两个单索引(x = ? and y > ?)

rest - 云到设备 Azure IoT REST API

azure - QNAmaker QNA 对的最大数量