Issues connecting to SQL Azure

Oct 3, 2009 at 4:56 AM

I've just downloaded this component but every time I try connecting I get the following error message:

---------------------------
Ops! Problems!
---------------------------
Exception getting data from SQL Azure, have you set your credentials? A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
---------------------------
OK  
---------------------------

Any suggestions on a workaround?  (and yes, I've entered the correct credentials and server name).  I can connect to the sql azure instance using SQL Azure Manager no problems.

Coordinator
Oct 3, 2009 at 9:22 AM

Hi and thanks for trying out the app. That's weird, but I've noticed that sometimes SQL Azure itself is not available. I've seen that happen a couple of times, then I tried a few minutes later and it worked.

It's a pretty ordinary SqlConnection so my guess it's either SQL Azure is down, a firewall or something stopped the network traffic to Azure or perhaps you need to re-check your settings again and make really sure you got the right servername and such. I don't know if there's any limitation to the number of connections you can have for your SQL Azure account, but I've never heard about such limits.

How many databases have you got created? Using any "unusual" characters for login or database names? (just thinking of odd things here :)

Oct 3, 2009 at 12:18 PM

Actually, the first error I got was the following.  I read this to indicate that the server should just be "servername" - I got it to work on one machine by extending this to the full dns name.  On the other machine I then needed to follow the second part of the error message message which says that the user name should include the servername.  I should have realised this as other SQL Azure tools sometimes require this in order to connect.  Best practice IMHO is to use the full server dns name and the username@servername format for the username.

---------------------------
Ops! Problems!
---------------------------
Exception getting data from SQL Azure, have you set your credentials? Server name cannot be determined.  It must appear as the first segment of the server's dns name (servername.ctp.database.windows.net).  Some libraries do not send the server name, in which case the server name must be included as part of the user name (username@servername).  In addition, if both formats are used, the server names must match.
---------------------------
OK  
---------------------------

All up and running now, so all good, thanks.

Coordinator
Oct 3, 2009 at 1:00 PM

I think it depends on which user you are connecting with. I've mostly used the default "admin" so far, without having to use the username@servername format, so I'm not sure why you'd have to use that format. MSDN has these things to say about SQL Azure users:

Because some tools implement tabular data stream (TDS) differently, you may need to append the SQL Azure server name to the login in the connection string using the <login>@<server> notation. In these cases, separate the login and SQL Azure server name with the @ symbol. For example, if your login was named login1 and the fully-qualified name of your SQL Azure server is servername.ctp.database.windows.net, the username parameter of your connection string should be: login1@servername. This restriction places limitations on the text you can choose for the login name. For more information, see CREATE LOGIN (SQL Azure Database).

Are you using a user/login you created or the default administrator? I still have some work to do on the error handling for using logins with restricted access...

Oct 3, 2009 at 1:03 PM

I was just using the administrator account for the server, rather than an additional restricted user. It would be great to see some of the functionality of the sql azure migration wizard integrated into your work.  Any chance the projects could be merged?

Nick Randolph | Built To Roam | Microsoft MVP - Device Application Development | +61 412 413 425
The information contained in this email is confidential. If you are not the intended recipient, you may not disclose or use the information in this email in any way. Built To Roam does not guarantee the integrity of any emails or attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Built To Roam.

From: johandanforth [mailto:notifications@codeplex.com]
Sent: Saturday, 3 October 2009 11:01 PM
To: Nick Randolph
Subject: Re: Issues connecting to SQL Azure [sqlazureexplorer:70882]

From: johandanforth

I think it depends on which user you are connecting with. I've mostly used the default "admin" so far, without having to use the username@servername format, so I'm not sure why you'd have to use that format. MSDN has these things to say about SQL Azure users:

Because some tools implement tabular data stream (TDS) differently, you may need to append the SQL Azure server name to the login in the connection string using the <login>@<server> notation. In these cases, separate the login and SQL Azure server name with the @ symbol. For example, if your login was named login1 and the fully-qualified name of your SQL Azure server is servername.ctp.database.windows.net, the username parameter of your connection string should be: login1@servername. This restriction places limitations on the text you can choose for the login name. For more information, see CREATE LOGIN (SQL Azure Database).

Are you using a user/login you created or the default administrator? I still have some work to do on the error handling for using logins with restricted access...

Read the full discussion online.

To add a post to this discussion, reply to this email (sqlazureexplorer@discussions.codeplex.com)

To start a new discussion for this project, email sqlazureexplorer@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Oct 3, 2009 at 1:14 PM

I don't know about integration/merging of projects, perhaps! This tool is just something fun I started to learn more about the bits, but we could try and contact the migration wizard people and hear what they say.

I'm thinking of adding some simple functionality to manage logins.