Oracle 12c on Ubuntu 12.04

oracleUbuntu

I just installed Oracle database 12c on an Ubuntu 12.04. I followed this tutorial Installing Oracle 12c on Ubuntu 12.04 (64 bit)..a hard journey, but it’s worth it! by GemsOfProgramming (kudos to the guy who did it by the way). I haven't done much more than that.

After the installation I tried to connect sqldeveloper to the database, something I already did with 11g & Win7 and 11g & Ubuntu, however I'm getting this error:

Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection

I tried executing the netac command but it didn't work as a command I had to execute the bin, and the output was:

oracle@abdou-pc:/oracle/base/dbhome_1/bin$ ./netca

Oracle Net Services Configuration: No protocol specified No protocol specified Error: null

and here is the log:

http://pastebin.com/ir4ecG3u

thought this may also be of use:

root@abdou-pc:/home/abdou# oraenv

ORACLE_SID = [root] ?

ORACLE_HOME = [/home/oracle] ?

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID root.

You can set ORACLE_BASE manually if it is required.

/usr/local/bin/oraenv: 223: [: unexpected operator

My Oracle installation is in /oracle/base/dbhome_1

I don't know what other info I should post, and I don't wanna flood you people, so I'm here and I can post any info you need on demand.

It seems to me that my Oracle db isn't even launched, and neither are the listeners, and there might be a problem with my environment variables. I don't have much experience with the configuring part of the databases, and I know that Oracle isn't supported on Ubuntu … but I like Ubuntu and it's just for learning purposes.

Best Answer

To check if database or listener is running on Linux, you could check if Oracle processes are running, for example ps aux | grep pmon(or grep lsnr for listener). Pmon is process monitor, process responsible for "housekeeping", like freeing buffer cache or some resources that are not in use anymore. It is always running if the instance is up ( but this process does not guarantee that you can connect, because the database could be started in mount mode, anyway it is a start of a troubleshooting ).

It seems that you didn't set ORACLE_SID, ORACLE_BASE, ORACLE_HOME and PATH variables. On link that you provided, environment variables are set at the runtime. You could permanently set them in your .bashrc or bash_profile file.

Add these lines to your .bashrc file(it is in your users home directory, for example /home/oracle/.bashrc).

ORACLE_SID=name_of_your_database

ORACLE_BASE=/oracle/base/

ORACLE_HOME=/oracle/base/dbhome_1

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH

Reload new bash profile with command - source .bashrc and try again and read Oracle installation documentation for more detalis.

However, since Ubuntu is not supported OS for Oracle, there is no way to know for sure what the problem really is or was. If installation is for learning purpose, easier for you will be to install some supported OS in a VirtualBox for example, or to use Oracle prebuild VMs.