8 Replies Latest reply on Oct 22, 2010 9:07 AM by Oviwan

    How to set the listener in 11g r2 in linux

    djgeo
      Hi,


      can someone guide me on adding a new listener other than the default port in oracle 11g r2 in linux?


      I tried editing the tns names.ora and listener.ora files.

      My dbca ,oui and netca is not coming up while i try to access them.


      Thank you.
        • 1. Re: How to set the listener in 11g r2 in linux
          Zoltan Kecskemethy
          cd $ORACLE_HOME/network/admin
          fire up your favorit editor like vi :) and create two configuration files:
          first one: sqlnet.ora
          # sqlnet.ora Network Configuration File: /home/oracle/app/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora
          # Generated by Oracle configuration tools.
          
          NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
          second one: listener.ora Edit your host name here!
          # listener.ora Network Configuration File: /your_oracle_home_full_path_would_be_here/network/admin/listener.ora
          # Generated by Oracle configuration tools.
          
          LISTENER =
            (DESCRIPTION_LIST =
              (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = <your_server_full_name_or_IP>)(PORT = 1521))
                (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
              )
              (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = EPBSD082)(PORT = 8080))(Presentation = HTTP)(Session = RAW)
              )
              (DESCRIPTION =
                (ADDRESS = (PROTOCOL = TCP)(HOST = EPBSD082)(PORT = 2100))(Presentation = FTP)(Session = RAW)
              )
            )
          ans start up your listener.
          lsnrctl start
          you have to setup your oracle shell variables for this!
          I do it with this way(using oracle oraenv script)
          I added these lines into my .bash_profile
          echo "Setting enviroment for MYDB as default"
          export ORACLE_SID=MYDB
          export ORAENV_ASK=NO
          . oraenv
          export ORACLE_UNQNAME=$ORACLE_SID
          export ORAENV_ASK=YES
          export NLS_LANG=AMERICAN_AMERICA.UTF8
          this will setup
          ORACLE_BASE, ORACLE_HOME, ORACLE_SID, ORACLE_UNQNAME, ORAENV_ASK, LD_LIBRARY_PATH and PATH (will add ORACLE_HOME/bin into it so you can run lsnrctl from any dir...)
          • 2. Re: How to set the listener in 11g r2 in linux
            Zoltan Kecskemethy
            BTW if you setup a vnc server and log in to it you may able to run all the tools you mentioned...
            1 person found this helpful
            • 3. Re: How to set the listener in 11g r2 in linux
              djgeo
              when i try to acess the dbca,oui and netca...nothing is coming up.Is it an issue with the database installation?
              but the installation of the database was successfull and i could connect to the database.But when i give lsnrctl it shows an error.

              TNS-12545- TNS:NO LISTENER
              TNS-12560- TNS:PROTOCOL ADAPTER ERROR
              TNS-00515- NO LISTENER
              • 4. Re: How to set the listener in 11g r2 in linux
                EdStevens
                user9336763 wrote:
                Hi,


                can someone guide me on adding a new listener other than the default port in oracle 11g r2 in linux?
                Why? One default listener, on one default port, is quite capable of servicing multiple database instances of multiple versions running from multiple homes.
                >
                I tried editing the tns names.ora and listener.ora files.
                The listener doesn't care about tnsnames.ora
                My dbca ,oui and netca is not coming up while i try to access them.

                So exactly what DOES happen? These are gui tools, so on *nix you'll need to export your DISPLAY variable to an x-server.
                Thank you.
                • 5. Re: How to set the listener in 11g r2 in linux
                  Zoltan Kecskemethy
                  Did you setup your oracle shell variables as I advice to do so?
                  Please give us more info what did you try and how.
                  • 6. Re: How to set the listener in 11g r2 in linux
                    IAK Tanoli
                    Kindly paste your /etc/hosts and $ORACLE_HOME/network/admin/listener.ora file
                    • 7. Re: How to set the listener in 11g r2 in linux
                      djgeo
                      when i installed oracle 11g in linux,towards the end of the install i got an error msg:


                      "Enterprise manager configuration failed due to the following error:

                      The Listener is not up or database service is not registered with it.Start the listener and register database service and run em configuration assistant again."
                      • 8. Re: How to set the listener in 11g r2 in linux
                        Oviwan
                        start netca as oracle
                        cd $ORACLE_HOME/bin
                        ./netca --> you need a x-window
                        and create a listener then start it with "lsnrctl start"
                        check the status with lsnrctl status