Advice! By setting Oracle environment variables correctly, make DBA life SO EASY!!! #shorts

HomeOther ContentAdvice! By setting Oracle environment variables correctly, make DBA life SO EASY!!! #shorts
Advice! By setting Oracle environment variables correctly, make DBA life SO EASY!!! #shorts
Advice! By setting Oracle environment variables correctly, make DBA life SO EASY!!! #shorts
I have been an Oracle DBA for over 26 years now, check out my LINKEDIN profile from this link www.linkedin.com/in/clanidem

I just wanted to share my knowledge with all the beginners who also want to become a DBA. I hope I can help you in some way by watching the short Oracle course videos I created.

Learn as best you can. This will help you in your life and that of your family. God has given us every opportunity HE can give us, so use them wisely and correctly.

Let's get started…

What is .bashrc file in Linux?
The .bashrc file is a script file that is executed when a user logs in. The file itself contains a series of configurations for the terminal session. This includes configuring or enabling: coloring, completion, shell history, command aliases, etc.

This is a hidden file and a simple ls command will not show the file.

To view hidden files, you can run the command below:

ls-a

Creating the Oracle Software Owner and Group
When you install Oracle software, you install it as an Oracle user. This allows you to apply certain security and tuning settings to the software without having to change the settings of other users of the system. In this section, the Oracle user is created and the dba and oinstall groups that have special permissions to the software are installed.

As root, run the following commands to create the Oracle user and groups:

# groupadd dba
# groupadd oinstall
# useradd -m -g oinstall -G dba oracle

The Oracle user is now configured and belongs to both the oinstall group and the dba group. To set the password for the Oracle user, call the passwd command as root, passing the username as an argument.

# oracle password

Setting Oracle User Environment Variables
Set environment variables in the installation owner user profile file on each cluster node.

You must define ORACLE_BASE and ORACLE_HOME and ORACLE_SID; also add ORACLE_HOME/bin to the path environment variable.
Set the environment variables as shown in the following example:

export ORACLE_BASE/u01/app/oracle
export ORACLE_HOME/u01/app/oracle/product/21.0.0/dbhome_1
export PATHPATH:ORACLE_HOME/bin
export ORACLE_SIDsales1

If the ORACLE_HOME and ORACLE_SID environment variables are not set and you try to use SQL*Plus or other tools, you receive an error message asking you to set these variables.

To check the environment variables configured by Oracle

env grep ORACLE
env grep PATH

To display the value of each Oracle environment variable using the echo command

echo ORACLE_BASE
echo ORACLE_HOME
echo ORACLE_SID
echo PATH

Example, your ORACLE_HOME directory is set to /u01/app/oracle/product/19.0.0/db_home1
and you want to access this directory

Just type
cd ORACLE_HOME

instead of
cd /u01/app/oracle/product/19.0.0/db_home1

Much easier and faster to navigate.
Makes the DBA's life easier if you have defined all the required environment in the Oracle bash profile or .bashrc file.

Happy learning and may God bless our learning journey!

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

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