Connect to a SQL Server Database on Azure through a proxy server

I am trying to access my Microsoft Azure service through the Visual Studio Community (v12 update 4) through a corporate proxy. I can access my mobile services and API scripts using the proxy settings I manually entered in the .config file ( http://en.code-bude.net/2013/07/15/how-to-setup -a-proxy-server-in-visual-studio-2012 / )

However, I cannot get into the SQL Server databases using Visual Studio or the included SQL Server Object Explorer. I am getting the following error:

Cannot connect to mydb.database.windows.net.

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) (Microsoft SQL Server, Error: 53)

      

FWIW I also cannot connect to SQL Database through SQL Server Management Studio through proxy at work, although I can do it from home. Accessing the web database through the Azure Management Portal has stopped working for several months - giving me a blank page on login, so I barely block access to the db.

I don't have access to my corporate proxy server. It is run by bureaucrats who are in charge of their own bunker.

Does anyone else successfully connect to the SQL server through a proxy?

+3


source to share


2 answers


Visual Studio tries to connect directly to SQL servers using port 1433.

It is very likely that your proxy only allows port 80 and 443.



If you can ask your proxy administrator to open these ports, follow these steps: some of the ways to bypass the proxy server.

  • Use SSL VPN (like OpenVPN). There are free VPN service providers available like VPNBook etc. (Search to find out more).

  • Use your phone hotspot or other internet connection that doesn't use a proxy connection.

+3


source


With Azure SQL DB v12 you can do this, but you need to make sure the database connection policy is set to "proxy". A power shell script that shows how to do this can be found at: - https://github.com/robotechredmond/Azure-PowerShell-Snippets/blob/master/AzureRM%20-%20Azure%20SQL%20DB%20Server% 20Connection% 20Policy.ps1



0


source







All Articles