Testing an ODBC DSN Using Isql
The unixODBC driver manager includes a utility named isql, which is a simple ODBC command-line client. It lets you to connect to a DSN to send commands and receive results, similarly to vsql.
To use isql to test a DSN connection:
-
Run the following command:
$ isql –v
DSNnameWhere DSNname is the name of the DSN you created.
A connection message and a SQL prompt display. If they do not, you could have a configuration problem or you could be using the wrong user name or password.
-
Try a simple SQL statement. For example:
SQL>
SELECT table_name FROM tables;
The isql tool returns the results of your SQL statement.
Note: If you have not set the ErrorMessagesPath in the additional driver configuration settings, any errors during testing will trigger a missing error message file ("The error message NoSQLGetPrivateProfileString could not be found in the en-US locale"). See Required ODBC Driver Configuration Settings for Linux and UNIX for more information.