How to fix Oracle TNS Listener Issues

 A few times over the course of working with Oracle, I’ve come across environments which had issues making connections to databases set up across a network. These were failing with the error “ORA-12514: No TNS Listener”.

I eventually found that to fix this, you need to follow the steps below:

  1. Install the Oracle Data Access Components (ODAC) on the machine attempting to make the connection
  2. Navigate to C:\app\<username>\product\<oracle_version>\client_1\Network\Admin\Sample (note that this is a Windows 7 path – it will differ for other OS’s)
  3. Copy tsnames.ora into the directory one above it
  4. Open it up and replace all the values in angle brackets with the correct values for your set up:
<data source alias> =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname or IP>)(PORT = <port>))
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = <database service name>)
 )
 )

Best of luck!

Leave a Reply

Your email address will not be published. Required fields are marked *