This discussion is archived
5 Replies Latest reply: Nov 9, 2012 10:39 AM by clcarter RSS

I can not connect to Oracle Database XE ubuntu 12.10

973247 Newbie
Currently Being Moderated
Hi I installed Oracle Database Express Edition 11g Release 2 http://www.oracle.com/technetwork/products/express-edition/downloads/index.html with ubuntu 12.10 64 bit, but I can not connect,i edited the files tnsnames.ora and listener.ora

listener.ora:
# listener.ora Network Configuration File:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = XE)
      (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 = aspire)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)
tnsnames.ora
# tnsnames.ora Network Configuration File:

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = aspire)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = PNPKEY))
    )
    (CONNECT_DATA =
      (SID = XE)
      (PRESENTATION = RO)
    )
  )
aleix@aspire:/u01/app/oracle/product/11.2.0/xe/network/admin$ sudo /etc/init.d/oracle-xe status 

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-NOV-2012 13:04:13

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                08-NOV-2012 13:04:03
Uptime                    0 days 0 hr. 0 min. 9 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/aspire/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=aspire)(PORT=1521)))
Services Summary...
Service "XE" has 1 instance(s).
  Instance "XE", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
aleix@aspire:/u01/app/oracle/product/11.2.0/xe/network/admin$ 
And from the SQL Developer I get:
Status: Failure -Test failed: IO Error: got minus one from a read call
And file log.xml
<msg time='2012-11-08T12:50:50.327+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.327+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Log messages written to /u01/app/oracle/diag/tnslsnr/aspire/listener/alert/log.xml
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.327+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Trace information written to /u01/app/oracle/diag/tnslsnr/aspire/listener/trace/ora_6024_139897614456576.trc
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.327+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Trace level is currently 0
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.328+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.328+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Started with pid=6024
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.329+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.329+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=aspire)(PORT=1521)))
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.333+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>Listener completed notification to CRS on start
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.334+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>
TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.335+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>WARNING: Subscription for node down event still pending
 </txt>
</msg>
<msg time='2012-11-08T12:50:50.335+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='aspire'
 host_addr='127.0.1.1'>
 <txt>08-NOV-2012 12:50:50 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=aspire)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647040)) * status * 0
 </txt>
</msg>
Thanks
  • 1. Re: I can not connect to Oracle Database XE ubuntu 12.10
    clcarter Expert
    Currently Being Moderated
    Is the database running? Try a `ps -ef |egrep pmon` should see an xe_pmon_XE process.

    The log.xml posted is the listener log, the important one the instance log, its under the diag/rdbms folder, and the not-XML version in the trace folder is much easier to read, alert_xe.log.

    Can see you've got loopback for your host that won't work if any clients want to connect remotely, but that's not important yet.

    First things first, connect to the database. Add your user to the dba group, set the environment, you should be able to get a sysdba connection.

    $ id
    ... groups=...,<N>(dba)...
    $ . /u01/.../bin/oracle_env.sh
    sqlplus /nolog
    conn /as sysdba
    ... Connected. # or could say idle instance ...

    If you can't remember what was entered for the sys and system passwords, sysdba can fix that.

    alter user system identified by <new passwd>;

    Next check the listener status and services, if you want to use the apex pages the networking details have to be correct or the web pages won't work.

    $ lsnrctl status
    ... Endpoints:
    ... host=... port=1521
    ... port=8080 ... presentation=http...

    If you have at least the 1521 you'd be able to connect from a remote client. If networking is set up correctly.
  • 2. Re: I can not connect to Oracle Database XE ubuntu 12.10
    973247 Newbie
    Currently Being Moderated
    aleix@aspire:~$ ps -ef |egrep pmon
    aleix     9133  9021  0 18:21 pts/1    00:00:00 egrep --color=auto pmon
    No where is the folder diag / RDBM and if I try to find the file does not appear alert_xe.log
    aleix@aspire:~$ sqlplus /nolog
    sqlplus: command not found
    The host computer is the same as the client
    aleix@aspire:~$ lsnrctl status
    command not found
    Thanks

    Edited by: 970244 on 08/11/2012 09:41
  • 3. Re: I can not connect to Oracle Database XE ubuntu 12.10
    clcarter Expert
    Currently Being Moderated
    So XE was installed ... was it configured?

    Also see the post(s) regarding Ubuntu after a certain version the setup for host memory is a bit different than the configure expects, depending on physical memory and swap. See this thread before trying to run the configure: {thread:id=2301639}

    linux configure step at http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#CIHHJEHF
  • 4. Re: I can not connect to Oracle Database XE ubuntu 12.10
    973247 Newbie
    Currently Being Moderated
    Thanks for answering, but I'm just going to use oracle with fedora since I have no problem
  • 5. Re: I can not connect to Oracle Database XE ubuntu 12.10
    clcarter Expert
    Currently Being Moderated
    Fedora is a bit easier. Don't think I've tried a fed17 XE install yet but it does just fine on fed16.

    If you're on a box with under 1G physical RAM be sure to pad up the swap to a bit over 2GB (or a full 2GiB) its much easier than resizing swap after the install.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points