0
votes

I have a connection string like

Dim conSql As OracleConnection
conSql = New OracleConnection("Data Source=QAIntManShad;User Id=QAIntManShad;Password=QAIntManShad")
conSql.Open()

And a TNSNAMES.ora file like

# ---------------------------------
# QA INT RELEASES SCHEMAS
# ---------------------------------

QAINTMANSHAD =
  (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=xxx.xxx.xxx.xx)
      (PORT=1521)
    )
    (CONNECT_DATA=
      (SID=xxxx)
    )
  )

When I test this locally it works fine. But when I run my process on a remote machine it crashes with the error "ORA-12541: TNS: No listener".

The local machine has tnsnames.ora at the location

C:\app\client\agreen\product\12.1.0\client_2\Network\Admin

Whereas the remote has it at

C:\app\product\11.2.0\client_1\network\admin\

I'm not sure if that might cause a problem, replacing the string in the code with the info in the TNSNames.ora file gets the program to work but I need my code to use the TNS file.

Is there any solution to this problem?

1

1 Answers

0
votes

Troubleshooting:

  1. Is your host resolvable (ping/nslookup/dig/host)?
  2. If yes, try the tns-layer (tnsping/sqlplus)
  3. Still no success? Firewall issue? (telnet host 1521)

Best of luck,

Bjarte