El problema
No es tan sencillo conectarse con el ODBC Driver "SQL Native Client" a un SQL Server el cual está ejecutándose en un puerto distinto al default (1433).
En mi caso puntual la necesidad era conectarme con este driver a un SQL Server 2005 que escuchaba las conexiones TCP en el puerto 2005.
El error que obtenía era:
Connection failed:
SQLState: '08001'
SQL Server Error: 21
[Microsoft][SQL Native Client]Encryption not supported on the client.
Connection failed:
SQLState: '08001'
SQL Server Error: 21
[Microsoft][SQL Native Client]Client unable to establish connection
Connection failed:
SQLState: '08001'
SQL Server Error: 0
[Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Lo cual la verdad no me ayudaba a encontrar una solución a mi problema, ya que el error mencionaba problemas con la encripción del cliente.
Continue reading →
El problema
Muchas veces es necesario establecer la misma la configuración ODBC entre distintos servidores o PCs. Para hacer esto tenemos dos caminos básicos:
- A mano (obviamente no es mi opción preferida)
- Mediante el registro de Windows
La solución
Para poder exportar la configuración ODBC abrimos el Registry Editor (C:\windows\regedit.exe) y vamos a la rama:
Mi PC\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
Dentro de esa rama del registro tenemos dos claves:
Continue reading →