开发者

Problem while connecting to cloud database

开发者 https://www.devze.com 2022-12-08 23:01 出处:网络
I am encountering a problem while connecting to the cloud database. In SqlCmd I have used like: sqlcmd -U servername@username -P myPassword -S servername.database.windows.net -d MyFirstCloudTestDB

I am encountering a problem while connecting to the cloud database.

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 serve开发者_如何学Gor.**
Msg 18456, Level 14, State 1, Server servername, Line 1
Login failed for user 'username'.

I have no clue what to do!


Right... try this:

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.


Don't you want: username@servername ?


Have you created the database in question? If not, try connecting to the master database instead.


You have to cancel the first screen and connect the SQL Azure using the New Query button window. In the options -> connect to Database -> MyFirstCloudTestDB and try. It should work.

If you have problem with the IP address. Change the firewall settings in the SQL AZure. The range 0.0.0.0 to 255.255.255.255. It is not recommendable but for time being it is alright.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号