Connect to an Oracle DB using ODBC Connect to an Oracle DB using ODBC oracle oracle

Connect to an Oracle DB using ODBC


Navigate to the Control Panel > Administrative Tools > Data Sources (ODBC)

Select the System DSN tab and click 'Add'. Next scroll down the lists of drivers until you find Microsoft ODBC for Oracle.

enter image description here

Fill in the required information in the above form and click 'OK'. Now you can add the tables to 'Access' by clicking on the 'External Data' tab then clicking on 'More'. Choose 'ODBC Databases', then 'Import the source data...', next click on the 'Machine Data Source' tab.


The simplest option to generate the tnsnames.ora file is to let Oracle do it. If you launch the Oracle Net Configuration Assistant (Start | Oracle in Oracle Home Name | Configuration and Migration Tools | Net Configuration Assistant), you should be able to choose "Local Net Service Name configuration" which allows you to add (or modify) a TNS alias. That will walk you through gathering the information you'll need to connect.

If you are more comfortable dealing with the text files directly, you can directly edit the tnsnames.ora file in %Oracle Home%\network\ADMIN\tnsnames.ora using this as a template.

<TNS alias> =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname or IP>)(PORT = <port>))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = <database service name>)     )   ) 


In tnsnames.ora, try changing SERVICE_NAME to SID. That worked for me.