TNS Listener Protocol adapter error

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
jlaudirt
Rank: Programador Pleno
Rank: Programador Pleno
Posts: 37
Joined: Sat, 30 Aug 2008 10:16 am
Location: vilhena - ro

Good afternoon to all

I know this subject is very discussed, but I could not make it work.
I just can not connect SQLPlus to Oracle. Always getting error of the protocol adapter
My machine is Win32. My intention is to raise the database and exports it to SQL file
The interesting is that SQLNavigator 6.1 can enter as SYS.

Down files TNSNAMES.ORA, SQLNET.ORA AND LISTENER.ORA
TNSNAMES.ORA

Select all

 
# tnsnames.ora Network Configuration File: E:\app\jenny\product\11.2.0\dbhome_1\network\admin\tnsnames.ora 
# Generated by Oracle configuration tools. 
 
LISTENER_PROD1 = 
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522)) 
 
 
PROD = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522)) 
    ) 
    (CONNECT_DATA = 
      (SID = PROD) 
      (SERVER = DEDICATED) 
      (SERVICE_NAME PROD = prod) 
    ) 
  ) 
 
PROD1 = 
  (DESCRIPTION = 
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522)) 
    (CONNECT_DATA = 
      (SERVER = DEDICATED) 
      (SERVICE_NAME = prod1) 
    ) 
  ) 
SQLNET.ORA

Select all

 
 
SQLNET.AUTHENTICATION_SERVICES= (NTS) 
 
NAMES.DIRECTORY_PATH= (TNSNAMES) 
ADR_BASE = E:\app\jenny\product\11.2.0\dbhome_1\log 
Listener.ORA

Select all

 
SID_LIST_LISTENER = 
  (SID_DESC = 
    (GLOBAL_DBNAME = prod) 
    (ORACLE_HOME = E:\app\jenny\product\11.2.0\dbhome_1) 
    (SID_NAME = prod) 
  ) 
 
PROD = 
  (DESCRIPTION_LIST = 
    (DESCRIPTION = 
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522)) 
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) 
    ) 
  ) 
 
ADR_BASE_PROD = E:\app\jenny 
Thanks instructions
ruibarros
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 93
Joined: Thu, 29 Jan 2009 11:44 am
Location: Cuiabá
Rui Barros
OCP - Oracle Certified Professional

Hello JlaIRT,
First confirm on the Net Manager the port that is using for Bank,
because by default it is 1521 and I saw that you are using 1522. He changed, OK, no problems.

Another thing, change in your tnsnames, the host. Try to place the server name.
I also noticed your service name. Usually we use: PROD.dominio

Then try to set your listener more or less like this:

Select all

PROD = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = TCP)(HOST = NOME-DO-SERVER)(PORT = 1521)) 
    ) 
    (CONNECT_DATA = 
      (SERVICE_NAME = ORAPROD.jlaudirt.com.br) 
    ) 
  )
Remembering That this is a example model [/ u] ... and you can find your settings on Net Manager.
jlaudirt
Rank: Programador Pleno
Rank: Programador Pleno
Posts: 37
Joined: Sat, 30 Aug 2008 10:16 am
Location: vilhena - ro

Friend Ruibarros, thank you for your attention to respond to my topic.
I discovered the mistake, simple, but I was giving me a headache.

Windows has a chatice not to record the environment variables.
Searching on the internet I found a guy (American) with the same problem and then I decided to test his solution:

Select all

set ORACLE_HOME=CAMINHO 
set ORACLE_SID=SID
and is not What worked ????
ruibarros
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 93
Joined: Thu, 29 Jan 2009 11:44 am
Location: Cuiabá
Rui Barros
OCP - Oracle Certified Professional

How nice that it solved ...
It is not that it does not record, the variables should be set in hand.

Embrace. : Wink:
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests