问题
I am trying to connect to a windows azure database through visual studio
Here are my steps :
- I press add connection on the server explorer
- fill in the server name .database.windows.net
- Select Use SQL server Authentication
- Fill in the username and password
- Enter a database name
When I press Ok, I have to wait some time and then it gives and error 40: could not connect to sql server.
My Azure server is set to accept ip from (0.0.0.0 - 255.255.255.255) and so is the MicrosoftServices, can someone please help me with this? I'm really stuck, I've tried about everything I could think of :(
I was following this tutorial: http://social.technet.microsoft.com/wiki/contents/articles/2151.windows-azure-and-sql-azure-tutorials-tutorial-2-using-sql-azure-en-us.aspx
Got stuck at step 7...
回答1:
You need to be running SQL Server 2008 R2 (+ Service Packs) to connect via SSMS (SQL Server Mgmt Studio)
回答2:
Does the location you're connection from block outbound traffic/connections on port 1433? This is actually a bit more common than folks realize. If you're 100% positive its not blocked, two things I'd recommend trying are a) remove and readd the rule b) put in a more specific rule using the IP you're actually coming from.
回答3:
Please make sure the username is correct. You can also try to use the following format:
<login>@<server>
In addition, I would like to suggest you to check http://msdn.microsoft.com/en-us/library/windowsazure/ee336282.aspx for some general troubleshooting guidelines about connecting to SQL Azure.
Best Regards,
Ming Xu.
来源:https://stackoverflow.com/questions/10227186/cant-connect-to-windows-azure-database