开发者

Oracle TNS problems?

开发者 https://www.devze.com 2022-12-29 02:41 出处:网络
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.

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.


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


The error is probably in the listener.ora file. Try replacing localhost in the line reading (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) with the name OR the ip number of the server where the listener is running on.


I'd replace localhost with whatever ipconfig tells you is the IP address you are using.


Unfortunately, this error can happen in a variety of cases.

  1. The Oracle database service (OracleServiceXE or whatever edition you are using) is not actually running.
  2. The user was trying to run the TNSListener service under a non-administrator account, preventing it from registering the associated Windows service.
  3. There was a conflict due to more than one ORACLE_HOME on the machine.
  4. There is nothing wrong with the service or configuration settings, but the TNSListener service won't start successfully until the Windows server has been restarted.


I've solved this error message today by running LSNRCTL start from cmd.exe, started "as Administrator".

I have 'localhost' server in listener.ora and in tnsnames.ora. Also i have SQLNET.AUTHENTICATION_SERVICES = (NONE) in sql.ini

Before I go trying use LSNRCTL.EXE, I haven't listener servise in windows services list. LSNRCTL start command from administrator's cmd make it for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消