3
votes

Can't find a definitive answer, or get it working. This site says "To use an on-premises SQL Server or SQL Server Express database with a hybrid connection, TCP/IP needs to be enabled on a static port. Default instances on SQL Server use static port 1433, whereas named instances do not."

http://azure.microsoft.com/en-us/documentation/articles/web-sites-hybrid-connection-connect-on-premises-sql-server/

My installation of a named instance IS on a static port (1555), as outlined here:

http://blogs.msdn.com/b/arvindsh/archive/2012/09/08/how-to-assign-a-static-port-to-a-sql-server-named-instance-and-avoid-a-common-pitfall.aspx

I have the hybrid connection configured in the azure portal with port 1555 and it shows as "Instance Connected".

In my app's connection string, I am specifying the instance name and port just as if the app was on-premise, which does work when run locally. (server\instance, 1555)

I opened all the appropriate firewall ports, but when running the app from azure, I'm getting the standard connection error: 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: TCP Provider, error: 0 - No such host is known.)

So is a named instance on a non-standard port supported for hybrid connections, and if so, is the connection string the standard format of : server\instanceName,port#

Thanks

1

1 Answers

5
votes

This is an old post, so presumably not relevant any more. But in case anyone else finds it useful... Yes you can use a named instance on a non-standard port for Hybrid connections, I've got a couple of connections like this set-up. For reference, the connection string needs to be in the format of

Driver={SQL Server};Server=SERVER_NAME.DOMAIN.com\INSTANCE,PORT;Database=DATABASE_NAME;UID=USERNAME;PWD=PASSWORD

I found that it didn't work (for me) unless I fully qualified the server name with the domain too