priyanka.sarkar
priyanka.sarkar

Reputation: 26498

Problem while connecting to cloud database

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 server.**
Msg 18456, Level 14, State 1, Server servername, Line 1
Login failed for user 'username'.

I have no clue what to do!

Upvotes: 1

Views: 1110

Answers (4)

Supremestar
Supremestar

Reputation: 190

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.

Upvotes: 0

Rob Farley
Rob Farley

Reputation: 15849

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.

Upvotes: 1

Rob Farley
Rob Farley

Reputation: 15849

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

Upvotes: 0

Rob Farley
Rob Farley

Reputation: 15849

Don't you want: username@servername ?

Upvotes: 1

Related Questions