ODP.NET TNS: no listener

I am currently trying to connect to an Oracle database. I can connect perfectly on my development machine, but when I deploy my sp2 server to Win2k3, I get the following error.

Disable access to an open connection ... Oracle.DataAccess.Client.OracleException ORA-12541: TNS: no Liestener in Oracle.DataAccess.Client.OracleException.HandleErrorHelper (Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValxtalxqtpoqxpocalqtpoxqlpocalptq String procedure, Boolean bCheck)

Any thoughts, ideas, instructions will be useful. I am using Oracle.DataAccess.dll version 4.112.1.2.

thank

+3
source share
4

.

-, , Oracle, . , , TNS: .

, , , Oracle Client. , ( ) , .

+3

. - , "" .

tnsnames.ora - :

oracle =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = tcp)(HOST = myoracleserver.mydomain.com)(PORT = 1525))
    )
    (CONNECT_DATA =
      (SID = MYORACLESERVER)
    )
  )

Data Source ( ):

User Id=scott;Password=tiger;Data Source=oracle

To ( ):

User Id=scott;Password=tiger;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=myoracleserver.mydomain.com)(PORT=1525)))CONNECT_DATA = (SID = MYORACLESERVER)))

ODP.NET. - , ADODB-.

UPDATE:

ODP.NET tnsnames.ora . , , , tnsnames.ora Web.Config App.Config.

. , .

+2

It looks like the machine your TNSNames record points to is not working. Three different options that I could see ... (1) the record points to different machines in tnsnames.ora (different on both machines), (2) the DNS resolution is different between the two machines, or (3) the listener is listening on a different port, perhaps if one is running on the computer.

0
source

I also found out. TNSNAMES.ora file, inside the network pool \ admin folder has spaces at the beginning of the instances.

Example:

MYORACLESERVER =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = tcp)(HOST = myoracleserver.mydomain.com)(PORT = 1525))
    )
    (CONNECT_DATA =
      (SID = MYORACLESERVER)
    )
  )
0
source

Source: https://habr.com/ru/post/1771796/


All Articles