Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle TNS problems?

I have an error ? My pl/Sql Developer says my oracle database cannot find the service descriptor But when I Do a check the listener I get this error.

LSNRCTL> start
Starting tnslsnr: please wait...

Service OracleOraDb10g_home1TNSListener already running.
TNS-12560: TNS:protocol adapter error
 TNS-00530: Protocol adapter error



LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   32-bit Windows Error: 61: Unknown error

the content of my listener.ora is

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = Oracle10g)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )

and the tnsnames.ora content is this

# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

VMOBILE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

VMOBILEMASTER =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = SHARED)
      (SERVICE_NAME = ORCL)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

Please I have a deadline for these evening. Please help.

like image 766
persistence Avatar asked Apr 29 '10 10:04

persistence


1 Answers

This is probably a configuration issue, which means it is difficult for us to solve remotely. The two things you need to check are

  1. The entries in your LISTENER.ORA file match your TNSNAMES.ORA file
  2. The information in your hosts file is correct.

Is this a local or a remote database you're attempting to connect to?

edit

The hosts file (in a windows environment) is in somewhere like

C:\WINDOWS\system32\drivers\etc

Obviously it depends on how your environment is set up (different drive letter or whatever).

edit

You need the GLOBAL_DBNAME in the listener file to match the SERVICE_NAME in the tnsnsames file i.e. ORCL

like image 152
APC Avatar answered Oct 18 '22 22:10

APC