Solved

Not able to start/stop listener having client and database on same machine (AIX 6.1)

Posted on 2013-06-12
7
1,664 Views
Last Modified: 2013-06-18
Hi,

I have database oracle11gR2 11.2.0.1 installed on my machine AIX 6.1 64 bit at location - /home/oracle/app/oracle/product/11.2.0/dbhome_1 and I installed Oracle 11gR2 client 32 bit on the same machine - /home/oracle/app/oracle/product/11.2.0/client_1. Then I export

    enter code here
    ORACLE_HOME= /home/oracle/app/oracle/product/11.2.0/client_1
    ORACLE_SID =orcl
    LIBPATH=$LIBPATH:$ORACLE_HOME/lib and
    PATH =$PATH:$ORACLE_HOME/bin

I also copied the TNSNAMES.ORA from dbhome_1/network/admin to client_1/network/admin

From db_home/bin - Am trying to start and stop the listener it is saying -
    bash-3.2# ./lsnrctl

    LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production on 12-JUN-2013    
    01:55:12


Welcome to LSNRCTL, type "help" for information.

    LSNRCTL> status
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    IBM/AIX RISC System/6000 Error: 79: Connection refused

I also checked -    bash-3.2# ps -ef | grep lsnr
    oracle 12845248 1 0 11:18:12 - 0:10     /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit
root 15466574 11272326 0 02:06:54 pts/0 0:00 grep lsnr

I need to connect sqlplus / as sysdba which is complaining bash-3.2$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 13 01:05:07 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

    ERROR:
    ORA-12545: Connect failed because target host or object does not exist

My listener.ora file -

# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST =lodibm17.ca.com)(PORT = 1521))
        )
      )

    ADR_BASE_LISTENER = /home/oracle/app/oracle


My tnsnames.ora file  -

# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST =lodibm17.ca.com)(PORT = 1521))


    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST =lodibm17.ca.com)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME =orcl.ca.com)
        )
      )

SQlnet.ora
# sqlnet.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    ADR_BASE = /home/oracle/app/oracle

I also noticed -

tnsping orcl.ca.com

TNS Ping Utility for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production on 13-JUN-2013 01:10:24

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:
    /home/oracle/app/oracle/product/11.2.0/client_1/network/admin/sqlnet.ora

Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.131.91.157)(PORT=1521)))
OK (530 msec)

have one question - the host which tnsping is pinging Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.131.91.157)(PORT=1521))), it should be same in tnsnames.ora or listener.ora ?

From which file tnsping is picking up the HOST=10.131.91.157 because in tnsnames.ora/listener.ora the hostname is lodibm17.ca.com (141.202.119.143) is different as it is shown below in /etc/hosts file..

ere is my content of /etc/hosts file on AIX -

127.0.0.1       loopback localhost      # loopback (lo0) name/address
141.202.119.143      lodibm17.ca.com lodibm17

Please help me to resolve the issue
0
Comment
Question by:kapil12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 375 total points
ID: 39244181
First, when you are trying to start the listener, ORACLE_HOME should be set to /home/oracle/app/oracle/product/11.2.0/dbhome_1.  According to your settings, it is set to the client home, which is incorrect.  The listener belongs to the database, not the client.

When trying to make a connection the TNS settings would come from the tnsnames.ora in the $ORACLE_HOME/network/admin directory, or the one in $TNS_ADMIN if that is set.
0
 

Author Comment

by:kapil12
ID: 39244220
Yes able to Resolve the by setting ORACLE HOME to dbhome_1 and can able to start and stop the listener and able login sys as sysdba.

But it can't be possible with client ? From client am able to login with system/firewall@orcl. So can we start and stop listener from client ?
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 375 total points
ID: 39244716
You cannot start/stop the listener from the client.  It is typically started from the same home as the database.  It definitely should be the same version.

I have seen rare cases where the listener is not on the same machine as the home, but those become a little difficult to manage.  It is better to keep it simple and start the listener from the same home as the database.  In the many installations I have seen over the years, I have only run across it once and in that case there was one listener on a single machine with many databases than ran out of different homes.  Personally, I don't like it and it becomes a nightmare to manage as all databases are tied to that one listener and maintenance windows become difficult to manage.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 37

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 125 total points
ID: 39246961
>>The listener belongs to the database, not the client.

Technically, it belongs in the oracle home of the database software install
having a database in that same home isn't actually required for the listener to work

you could have databases running in homeX
and run your listeners in homeY

actually you can have 1 listener for the complete host for hundreds of databases in different homes on that same host
0
 
LVL 35

Accepted Solution

by:
johnsone earned 375 total points
ID: 39247367
Yes, you can do that, but as I pointed out, I believe that become too difficult to manage.  If you need downtime for the listener, then you need to coordinate hundreds of outages, not just single outages.

I was really  trying to point out that the listener is a process that has nothing to do with the client install.  In this case, were both database and client software is on the same machine, it really doesn't make sense to me to be trying to run the listener out of the client software home.
0
 

Author Closing Comment

by:kapil12
ID: 39255631
Thanks for the Info. Am successfully able to run from database.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 39255976
downtime for a listener ?
never tried reload ?

edit the listener.ora
then from command prompt:

> lsnrctl
lsnrctl> reload
lsnrctl> status

done
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Database ERD 4 80
PL/SQL: ORA-00979: not a GROUP BY expression 3 56
how to remove error in database 6 36
SQL Get Store Procedure Column Name As Row 5 41
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question