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.
精彩评论