Oracle XE on Ubuntu Hardy

I just installed Oracle XE following the instructions I got from here. After the installation I was unable to successfully log into the Database Home page. It told me: Invalid Login Credentials. This seams to be a common problem with the Linux installation. The solution is all though very simple and is shown under “post installation tasks” at the end of this post.

Installation

 

Add this line to /etc/apt/sources.list file:

deb http://oss.oracle.com/debian unstable main non-free

Next, you will need to add the GPG key.

wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -

As root, type:

apt-get update
apt-get install oracle-xe
/etc/init.d/oracle-xe configure

 

Post Installation Tasks

To fix the “Invalid Login Credentials” bug: It looks like the installer sets the wrong password on the sys and system users when running the configure command. The solution is simple, just change the password.

First add you user to the dba group.

sudo usermod -a -G dba yourusername

Then log in with your OS username as sysdba.
Paste the following lines into a shell and press enter:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE

export PATH

(If you close the shell now, you will have to do it again, so keep it open. To make it persistent paste the lines into your ~/.bashrc file. )

sqlplus / as sysdba

And change the password

alter user system identified by newpassword;
alter user sys identified by newpassword;

Now you should be able to successfully log into the Database Home page with both the sys and the system user.

  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • Google Bookmarks
  • StumbleUpon
  • FriendFeed

12 thoughts on “Oracle XE on Ubuntu Hardy”

  1. Hi thank you very much for the tip.

    Just to add when executing the line:

    #ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

    make sure you don’t do by mistake:

    #ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/

    I did this and took me a while to figure out what had gone wrong — if you get it wrong sqlplus won’t connect to your instance as when you type:

    # PATH=$PATH:$ORACLE_HOME/bin

    it infact gets translated to

    #PATH=$PATH:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//bin

    instead of

    #PATH=$PATH:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin

  2. Excelent I could changed SYSTEM password.

    In the Sql*plus console from “Oracle Database 10g Express Edition” Menu

    SQL> CONNECT / AS SYSDBA
    Conectado.

    SQL> alter user SYSTEM identified by ;

    Usuario modificado.

    Thanks.

  3. Hi,
    I have done all the steps , but when I want to login to Oracle I get the message ‘Invalid login credentials’, I login with ‘system’ and the password I am sure is the one I gave when I installed Oracle. I would appreciate any help

  4. When I create the database link on XE, it gets created. But while referring to the object I am getting error. ORA-12154: TNS:could not resolve the connect identifier specified

    What could be the issue ?

Leave a Reply

Your email address will not be published. Required fields are marked *


9 × = sixty three

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>