Using 127.0.0.1 as the server name in the ODBC System DSN setting and database connection failures
|Date:||31 May 2013|
|Product/Release:||Visual LANSA - All supported versions|
|Abstract:||Visual LANSA default installation uses 127.0.0.1 as the server name for an ODBC DSN which can sometimes have connection issues|
|Submitted By:||LANSA Technical Support|
The default Visual LANSA installation against a SQL Server database uses a Server name of 127.0.0.1\<instance name> when creating an ODBC System DSN entry. 127.0.0.1 is the loopback address in Windows. Visual LANSA sets the server name to 127.0.0.1 as this was the proven to be the best option to cater for both domain and non-domain environments.
It has been reported that sometimes, and this can be after a few days or weeks, this DSN connection becomes invalid and fails a connection test. Only when the actual PC name is specified in the Server setting does the connection start working again.
One possible cause might be that if a firewall is installed, this is
affecting the connection using the loopback address.
The following scenario has been observed.
Installing Visual LANSA on a PC with the Comodo firewall installed.
The ODBC test connection completed OK but the Visual LANSA install failed to access the database. Changing the server name from 127.0.0.1 to the PC Name allowed the database connection to complete. However, connecting to the database with a server name of 127.0.0.1\<instance name> with the firewall disabled also connected successfully.
Other reasons may exist for problems resolving to the loopback address and LANSA is still monitoring this situation. However, the existence of a firewall is one reason for causing this issue.