Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enabling TNS_LISTENER

Status
Not open for further replies.

superrug

Technical User
Jun 18, 2003
19
GB
Good morning all, wondering if anyone can help me with a question. How do i configure the listener, i have got the oracle client software so that i can access the database directly but now i need to setup the listener on the server so i can actually access the database itself. I have searched the oracle website high and low but to no avail.
 
what version of oracle are you using ?

just to confirm, DB on AIX and client is on wintel ?
 
Oracle version 8.1.5.0.0 and the client in running the oracle 8i client software
 
for server run netasst from oracle account, this will start X net8 assistant tool, under LOCAL / LISTENERS you can complete config parameters (it is quite straight forward).

this will update your $ORACLE_HOME/network/admin/listener.ora to start the listener enter lsnrctl start

on the client you need to update your ORACLE_HOME/network/admin/tnsnames.ora with connectivity information. this is done again frmo the net8 assistant under start/programs/oracle/network administration for this config you are looking under LOCAL/ SERVICE NAMING (again quite straight forward)

if you do need more info, check out
this is the net admin guide for 8.1.5

good luck - gary
 
Hi,

lsnrctl status # to display if your listener is running
lsnrctl start # to start it
lsnrctl stop # to shut it down


1 - be sure your listner is runnig :
connect as oracle or dba user
type in the command
# lsnrctl status
sample display

LSNRCTL for IBM/AIX RISC System/6000: Version 8.1.7.2.0 - Production on 27-NOV-2
003 14:14:35

(c) Copyright 1998 Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 8.1.7.2.
0 - Production
Start Date 27-NOV-2003 02:35:59
Uptime 0 days 11 hr. 38 min. 35 sec
Trace Level off
Security OFF
SNMP ON
Listener Parameter File /etc/listener.ora
Listener Log File /tmp/oracle/listener.log

2 - if you don't see a display like this

configure the file /etc/listener.ora or
/$ORACLE_HOME/network/admin/listener.ora
with your hostname or IP address

configure the file /etc/sqlnet.ora or
/$ORACLE_HOME/network/admin/sqlnet.ora
with your directories for logging listener activity


start your listener this way :

# lsnrctl start
# lsnrctl status #to verify

configure also the file /etc/tnsnames.ora or
/$ORACLE_HOME/network/admin/tnsnames.ora
with your hostname or IP address and the name of your service ( oracle instance)



 
Right , think maybe ive messed this good and proper. It gave the same sorta read out when i did lsnrctl status, i stopped the service then amended the listener.ora file. Now when i run anycommand lsnrctl status start or stop, comes up with lsnrctl : not found ! what have i done , please assist , and it was all going so well
 
Right more info , have started the service but i get this reply.

Connecting to (ADDRESS=(PROTOCOL=IPC) KEY=*my domain*
TNS-12541 TNS: no listner
TNS-12560 TNS:protocol adapter error
TNS-00511: no Listener

Any ideas what the hell ive done ?
 
Hi,
1 -Be sure connect as oracle or dba ( not root)

verify :

# whence -v tnslsnr
tnslsnr is /oracle/ora_8.1.7/bin/tnslsnr
# echo $ORACLE_HOME
/oracle/ora_8.1.7
#
If you don'have this,
affect the right value to ORACLE_HOME
amend PATH=$ORACLE_HOME:$PATH

 
Seems the same
AIX:<liprod> echo $ORACLE_HOME
/ora8bin/app/oracle/product/8.1.5
AIX:<liprod> whence -v tnslsnr
tnslsnr is /ora8bin/app/oracle/product/8.1.5/bin/tnslsnr

Get this when i run lsnrctl start :

Starting /ora8bin/app/oracle/product/8.1.5/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 8.1.5.0.0 - Production
System parameter file is /ora8bin/app/oracle/product/8.1.5/network/admin/listene
r.ora
Log messages written to /ora8bin/app/oracle/product/8.1.5/network/log/listener.l
og
Listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=liprod.world))
Listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=L))
Listening on: (ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=89.10.10.4)(Port
=1526))
TNS-01201: Listener cannot find executable /orabin/app/oracle/product/8.1.5/bin/
oracle for SID L

Please HELP !
 
hi,

Your service is not present in the cofiguartion file :tnsnames.ora at location ORACLE_HOME/network/admin

Add some lines like this :
( replace XXX with your service name or instance and YYY with hos name or IP address )

XXX =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = YYY )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = XXX )
)
)

 
Now reads as this :

#
# Generated by Oracle Net8 Assistant

L =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = loopback)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = L.unifour.uniglaze.com)
)
)
liprod.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 89.10.10.4) (PORT = 1526))
)
(CONNECT_DATA =
(SERVICE_NAME = liprod.world

But still get the same errors :
LSNRCTL for IBM/AIX RISC System/6000: Version 8.1.5.0.0 - Production on 27-NOV-0
3 15:18:00

(c) Copyright 1998 Oracle Corporation. All rights reserved.

Starting /ora8bin/app/oracle/product/8.1.5/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 8.1.5.0.0 - Production
System parameter file is /ora8bin/app/oracle/product/8.1.5/network/admin/listene
r.ora
Log messages written to /ora8bin/app/oracle/product/8.1.5/network/log/listener.l
og
Listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=liprod.world))
Listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=L))
Listening on: (ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=89.10.10.4)(Port
=1526))
TNS-01201: Listener cannot find executable /orabin/app/oracle/product/8.1.5/bin/
bin/oracle for SID L

ANd when you run status :

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=liprod.world))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
IBM/AIX RISC System/6000 Error: 79: Connection refused
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=L))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
IBM/AIX RISC System/6000 Error: 79: Connection refused
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
IBM/AIX RISC System/6000 Error: 79: Connection refused
Connecting to (ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=89.10.10.4)(Port
=1526))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
IBM/AIX RISC System/6000 Error: 79: Connection refused
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
IBM/AIX RISC System/6000 Error: 79: Connection refused
 
Hi,
Sorry, I made a mistake telling you so fast ( PORT = 1521 ) because you seem to use PORT 1526.
Any way this PORT Number in tnsnames.ora must be the same in listner.ora configuration.
Oracle looks first for listener.ora at :
1) /etc
2) $RACLE_HOME/network/admin
Oracle looks first for tnsnames.ora at :
1) $TNS_ADMIN
2) /etc
3) $RACLE_HOME/network/admin



Replace the line L= in your tnsnames.ora with the service name
Now reads as this :

#
# Generated by Oracle Net8 Assistant

L.unifour.uniglaze.com =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = loopback)(PORT = 1526))
)
(CONNECT_DATA =
(SERVICE_NAME = L.unifour.uniglaze.com)
)
)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top