Erro ao conectar-se ao MS SQL de um servidor, mas não do outro

5

Temos um servidor MS SQL e dois servidores de sites. Estou no processo de mover todos os sites de um dos servidores do site para o novo.

Meus sites asp.net não podem se conectar ao servidor de ms sql externo depois que eu os movi para o novo servidor. Eu sou capaz de ping o servidor MS SQL e acessá-lo por telnet usando a porta 1433 do servidor do site.

Funciona perfeitamente a partir do antigo servidor do site, por isso acho que há algo a ver com o novo servidor. Eu tentei desativar o firewall sem ajudar.

A ajuda seria muito apreciada!

Eu recebo os seguintes erros em dois sites diferentes (um executando .net 2 e outro .net 4):

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)

Exception Details: System.Data.SqlClient.SqlException: 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)

[SqlException (0x80131904): 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)]
DataAccessManager.ExecuteNonQuery(DbCommand command) in C:\Websites*\App_Code\DataAccessManager.vb:31
InsiteError.Save() in C:\Websites*\App_Code\System\InsiteError.vb:89

e

The network path was not found

Exception Details: System.ComponentModel.Win32Exception: The network path was not found

[Win32Exception (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond]

[SqlException (0x80131904): 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 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)]
DataAccessManager.ExecuteSelectCommand(DbCommand command) in C:\Websites*\App_Code\DataAccessManager.vb:18
InsitePage..ctor(String file_name, PageResult& Result) in C:\Websites*\App_Code\InsitePage\InsitePage.vb:68
_Default.Page_PreInit(Object sender, EventArgs e) in C:\Websites*\default.aspx.vb:298
BasePage.OnPreInit(EventArgs e) in C:\Websites*\App_Code\System\BasePages\BasePage.vb:249 System.Web.UI.Page.PerformPreInit() +49
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844

- Atualização - Tentando se conectar com o ms sql management studio do novo servidor eu recebo o seguinte erro:

TITLE: Connect to Server

Cannot connect to *.

------------------------------ ADDITIONAL INFORMATION:

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)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476


The network path was not found

    
por Arne H. Bitubekk 28.03.2014 / 16:05

1 resposta

0

Nossa empresa de hospedagem restringiu a conexão ao servidor SQL a ser apenas de endereços IP da rede local. O servidor do site antigo estava dentro dessa rede local, mas o novo site estava em uma rede diferente. Nossa empresa de hospedagem acabou corrigindo o problema depois de várias rodadas.

O que me desencorajou foi que quando eu remotamente me conectei com o novo servidor web, eu podia pingar e acessar o servidor por telnet usando a porta que o MS SQL usa. Instalei o Management Studio no servidor da Web e não consegui conectar-me ao servidor MS SQL usando-o. De alguma forma, a restrição conseguiu diferir o tipo de conexão e restringiu-a apenas para não permitir conexões SQL.

Este foi um caso bastante específico, mas esperamos que o que as pessoas possam tirar disso seja como depurar e determinar onde a questão se encontra.

    
por 10.10.2016 / 09:53