3 Replies Latest reply: Jan 10, 2013 2:45 AM by JackK RSS

    Installing and starting Oracle 11gXE (problem)

    JackK
      Hi,
      Some time ago I had problems with XE database: Insufficient privileges while connecting (and starting)

      Now I have another but little similar problem.
      I installed OracleXE from DEB package: oracle-xe_11.2.0-2_amd64.deb (several times: install and then uninstall with aptitude ).

      At the end of installation there is a message:
      You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
      So I'm doing:
      # /etc/init.d/oracle-xe configure
      Oracle Database 11g Express Edition is already configured
      The message was not displayed during my previous installations.
      But tnsnames.ora and listener.ora files looks like:
      # tnsnames.ora Network Configuration File:
      
      XE =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = %hostname%)(PORT = %port%))
          (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = XE)
          )
        )
      
      EXTPROC_CONNECTION_DATA =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
          )
          (CONNECT_DATA =
            (SID = PLSExtProc)
            (PRESENTATION = RO)
          )
        )
      # listener.ora Network Configuration File:
      
      SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
            (SID_NAME = PLSExtProc)
            (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
            (PROGRAM = extproc)
          )
        )
      
      LISTENER =
        (DESCRIPTION_LIST =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
            (ADDRESS = (PROTOCOL = TCP)(HOST = %hostname%)(PORT = %port%))
          )
        )
      
      DEFAULT_SERVICE_LISTENER = (XE)
      What must I do to fix this?

      (To be continued...)
        • 1. Re: Installing and starting Oracle 11gXE (problem)
          JackK
          No one can help me?
          • 2. Re: Installing and starting Oracle 11gXE (problem)
            clcarter
            Look like setup code finds an existing configuration file, so it thinks its already been done. Apparently not completely as the client (tnsnames.ora) and listener.ora don't have values set for host=... and port=...

            Check the /etc/sysconfig/oracle-xe, you may be able to get the configure to run by moving that oracle-xe file out of the way.

            The tnsnames.ora is only relevant to client setups, i.e. if you want to use a tns alias (like sqlplus system@xe) connection, or setting up a connection to another database on a different host.

            And listener.ora does not even need to be present for a default listener setup. So you could change to the network/admin folder and
            mv listener.ora listner.ora.bk0
            sudo su oracle -c "lsnrctl start"
              ...
            sudo su oracle -c "lsnrctl stat"
             ...
            To get the listener running and check its status. But there are other tasks the configure has to do to complete the setup. See if the database will startup:
            sudo su - oracle
            . /<oracle home path>/bin/oracle_env.sh
            sqlplus /nolog
            connect /as sysdba
            ... Connected ... or Connected to idle instance ...
            startup
            If you get just the "Connected" response to a connect /as sysdba the startup step is not needed.
            • 3. Re: Installing and starting Oracle 11gXE (problem)
              JackK
              Thanks for your response, clcarter.
              clcarter wrote:
              Look like setup code finds an existing configuration file, so it thinks its already been done. Apparently not completely as the client (tnsnames.ora) and listener.ora don't have values set for host=... and port=...

              Check the /etc/sysconfig/oracle-xe, you may be able to get the configure to run by moving that oracle-xe file out of the way.
              There's no /etc/sysconfig folder on my system.

              I "deleted" listener.ora file and trying to start listener:
              $ mv listener.ora listener.ora.bk0
              $ lsnrctl start
              
              LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-STY-2013 06:42:41
              
              Copyright (c) 1991, 2011, Oracle.  All rights reserved.
              
              Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...
              
              TNSLSNR for Linux: Version 11.2.0.2.0 - Production
              Log messages written to /u01/app/oracle/product/11.2.0/xe/network/log/listener.log
              Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
              TNS-12542: TNS:address already in use
               TNS-12560: TNS:protocol adapter error
                TNS-00512: Address already in use
                 Linux Error: 98: Address already in use
                  NL-08014: Failed to initialize Diagnosability framework, falling back to old network tracing/logging
               No valid ADR Base to use
              
                   NL-08013:  Invalid ADR Base directory
              
              Listener failed to start. See the error message(s) above...
              To get the listener running and check its status. But there are other tasks the configure has to do to complete the setup. See if the database will startup:
              sudo su - oracle
              . /<oracle home path>/bin/oracle_env.sh
              sqlplus /nolog
              connect /as sysdba
              ... Connected ... or Connected to idle instance ...
              startup
              $ whoami
              oracle
              
              $ env
              SHELL=/bin/bash
              TERM=xterm
              NLS_LANG=POLISH_POLAND.AL32UTF8
              USER=oracle
              ORACLE_SID=XE
              MAIL=/var/mail/oracle
              PATH=/u01/app/oracle/product/11.2.0/xe/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
              PWD=/u01/app/oracle
              LANG=pl_PL.UTF-8
              SHLVL=1
              HOME=/u01/app/oracle
              LOGNAME=oracle
              ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
              _=/usr/bin/env
              
              $ sqlplus /nolog
              
              SQL*Plus: Release 11.2.0.2.0 Production on Wt Sty 8 06:48:06 2013
              
              Copyright (c) 1982, 2011, Oracle.  All rights reserved.
              
              SQL> conn / as sysdba
              Connected to an idle instance.
              SQL> startup
              ORA-01078: failure in processing system parameters
              LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora'
              SQL>
              -------------------
              Edited by: JackK on Jan 10, 2013 8:43 AM

              I'm using Debian Linux 6.0 64-bit.
              Help me, please...