1

I'm trying to install Oracle DB on Linux. This is my first attempt, so don't judge me too hard.

I've run into a problem when creating a DB via DBCA:

Error starting Database Control. Please execute the following command(s).

1) Set the environment variable ORACLE_UNQNAME to Database unique name

2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole

Am I doing something wrong? Shall I continue or step back and do something?

Why I'm asking: I see that installation program hasn't set ORACLE_HOME variable as echo $ORACLE_HOME under oracle user displays an empty string. I remember that on Windows it is set automatically. So, am I missing a step here?

In common: on installing oracle software and DB, shall I perform specific steps to set ORACLE-related environment variables? Or it should be set automatically?

3 Answers 3

0

Before doing install, take some time to read installation guide for your platform and Oracle version (32bit or 64bit).
Here are just some hints
As it is your first installation, simplify things as much as possible.
You do not need database control or enterprise manager. Go 1st time without all bells and whistles.
For database creation, chose only character set and block size - any other parameter and option can be changed after installation. If you chose AL32UTF8, do not take already prepared installation, but chose custom install.

2
  • Thank you very much for the reply. But my question is: should the install program set ORACLE_HOME by itself? Is it an indicator that something is wrong in case ORACLE_HOME is empty after the installation?
    – Artsiom
    Feb 16, 2013 at 12:55
  • ORACLE_HOME should be set and ORACLE_HOME/bin added to PATH as well as libraries (check install guide). After installation you need to set env varables manualy.
    – igr
    Feb 16, 2013 at 13:04
0

As per igr, ORACLE_HOME and related variables must be set manually.

0

Using this guide I've installed Oracle DB 18c many times. But in my case to make $ORACLE_HOME/bin/ commands available through PATH, I've changed PATH in ~/.bash_profile to:

export PATH=/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin:$ORACLE_HOME/bin

In your case you could change it to:

export PATH=$PATH:$ORACLE_HOME/bin

Then, being root, I change user to oracle user by command:

# su - oracle

But before it you should have some variables exported:

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol7
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/18.3.0/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=cdb1
export PDB_NAME=pdb1
export DATA_DIR=/u02/oradata

Of course, values could be changed to reflect your settings.

Also, by following guides take a note about $ and # symbols, running commands under [oracle@host]$ user or under [root@host]# user as it is described in your guide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.