Sunday, May 01, 2011

Windows Azure Debugging Issue with SQL Server

I was working on a Windows Azure application today and when I tried to debug, I found that I was being stopped by the error below. I happen to have the full version of SQL Server on the machine in question, so my haughty first response was that I wasn’t going to install something else, but after trying the recommended approach, the simplest solution was to just install SQL Server Express.

Windows Azure Tools: Failed to initialize Development Storage service. Unable to start Development Storage. Failed to start Development Storage: the SQL Server instance ‘machinename\SQLExpress’ could not be found. Please configure the SQL Server instance for Development Storage using the ‘DSInit’ utility in the Windows Azure SDK.

I found this blog post that gives a lot of helpful info about the issue: http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx. I first checked the firewall and that wasn’t the issue. Then I used the utility referenced on this page to check SQL connectivity.


image

Sure enough, the SQL Browser service was disabled (it showed NOT LISTENING). I started the service and was able to get past the original error message. I then ran DSInit to specify my SQL instance.


image

However, after running DSInit and specifying my SQL instance, I got the error below which advised me to install SQL Server Express. Fine. I did and it worked.

Server Error in '/' Application.



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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

3. Sql Server Express must be installed on the machine.

image

Update: I haven't tried it, but I hear I'm supposed to use "/sqlserverinstance." to use the full version of SQL Server.

No comments: