连接到云数据库时出现问题
问题描述:
连接到云数据库时遇到问题.
I am encountering a problem while connecting to the cloud database.
在SqlCmd中,我已经使用过:
In SqlCmd I have used like:
sqlcmd -U servername@username -P myPassword -S servername.database.windows.net -d MyFirstCloudTestDB
这是正确的.错误消息是:
And it is correct. The error message is :
Msg 40615, Level 14, State 1, Server servername, Line 1
**Cannot open server 'servername' requested by the login. Client with IP address '
124.40.110.238' is not allowed to access the server.**
Msg 18456, Level 14, State 1, Server servername, Line 1
Login failed for user 'username'.
我不知道该怎么办!
答
正确...尝试一下:
转到sql.azure.com,登录,然后转到项目的页面.在您看到数据库列表的地方,您还应该看到一个显示防火墙设置"的选项卡.输入规则以允许您的IP地址范围.
Go to the sql.azure.com, log in, and go to your project's page. Where you see a list of databases, you should also see a tab which says "Firewall settings". Put a rule in to allow your IP addres range.
还要检查一下如何从网络外部查看您的范围.
But also check to see how your range is viewed from outside the network.