Tag Archives: ODBC

How to Configure the ODBC on Oracle XE Client

Even Oracle veterans may encounter some challenges when it comes to setting an odbc  using the Oracle XE Client.    As every DBA will tell you, you will need to configure the tnsnames.ora  (using  net configuration Assistant or by going  to oracle home\network\admin and edit it manually). After that, theTNS Service name in the ODBC will be populated with the entries from the tnsnames.ora file. You will only be required to choose the appropriate entry and you should be good to go.
This was the case in all the latest Oracle releases However If you will download the Oracle XE client you will quickly discover  that there is no tnsnames.ora under the Oracle client XE directory structure. In addition, the network\admin directory is not there as well.
Oracle documentation explains (In their usual user friendly way) how to connect to the Data Base using a connection string (username/password@[//]host[:port][/service_name] where service name is usually XE and port is 1521) but it is not that obvious how to configure the odbc to use this.
The solution is simple enough (once you find it). All that needs to be done is to type  the connection string  on the ODBC’s “ TNS Service Name” field.  Just add the line 127.0.0.1/XE (no need to use the drop down) and test the connection.
If the Data Base is on a different machine, you can replace 127.0.0.1 with the address of the remote server.