I've been trying to export oracle datadump with "expdp" utility in Oracle 18c. I've set the environment variables under ~/.bashrc as following
export ORACLE_HOME=/home/ubuntu/oracle-database-xe-18c-1.0/opt/oracle/product/18c/dbhomeXE
export ORACLE_SID=ORCL
export ORACLE_BASE=/home/ubuntu/oracle-database-xe-18c-1.0/opt/oracle/product
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
When I enter the command "expdp" in terminal - it keep saying your ORACLE_HOME is not set
root@ip-172-30-xx-xxx:~# expdp
UDE-00013: Message 13 not found; No message file for product=RDBMS, facility=UDE
UDE-00019: You may need to set ORACLE_HOME to your Oracle software directory
I'm new to Oracle Database at present. What could be the possible issue ? Do I need to set environment variables at some other places too ?
Note that Oracle XE is not really supported on Ubuntu: if you really want to use Oracle, install it on Oracle Linux (freely available): you will never see Oracle Database running in real production on Debian or Ubuntu and you will need to use Oracle Linux or RedHat Linux or Suse Linux.
Do not run Oracle utilities as root: you don't need to and it is generally a bad practice on Linux to use root account when it is not needed. Use a non privileged account to run Oracle utilities like SQL*Plus or Data Pump and make sure that your Oracle settings are run for each shell session: putting them in .bash_profile for the right account should be enough.
For this specific error message just make sure that ORACLE_HOME is correctly set: it is likely that your .bashrc has not been run.