tags:

views:

88

answers:

4

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!

+1  A: 

Don't you want: username@servername ?

Rob Farley
The same problem. Even I tried the same thru SSMS with the same error message
priyanka.sarkar
A: 

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

Rob Farley
Yes indeed.. I have already created the database
priyanka.sarkar
And can you connect to the master database?
Rob Farley
Sir.... I am unable to connect to any database.. May it be master or MyFirstCloudTestDB. Actually I am working in an organisation. So our internel IP is different than external. The one which I have presented here is the external one. I don't know how to proceed. Is there any security like firewall needs to be turned off or something of that sort?
priyanka.sarkar
Can you try from outside your work network some time?
Rob Farley
+1  A: 

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.

Rob Farley
Thank you very very much...... at last the success. I am very happy.
priyanka.sarkar
But 1 more thing.. after the successful connection ( in am doing thru SSMS) when I am trying to connect to the database i.e. MyFirstCloud database which is available in the Available Databases section, I am getting the error message " The database MyFirstCloudDB" is not accessible. What to do now?
priyanka.sarkar
I have posted this in a new link " http://stackoverflow.com/questions/1625452/cloud-database-problem-while-connecting-thru-ssms"
priyanka.sarkar
A: 

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.

Supremestar
I already completed my experiment.. but thanks anyways
priyanka.sarkar