Setting Oracle environment variables under Linux

Source: Internet
Author: User

Linux Setting Oracle Environment variables

Method One: Run the export command directly to define the variable, which is valid only under the current shell (bash) or its child shell (bash), the shell is closed, the variable is invalidated, the new shell is opened without this variable, and needs to be redefined.

To set Oracle environment variables as an example

Export oracle_base=/data/app/ORACLE, export oracle_home= $ORACLE _base/product/12.1. 0/dbhome_1; export Oracle_sid=orcl; export PATH= $ORACLE _home/bin: $PATH;

Method Two: Add the variable in the. bash_profile file in the user directory, and the change amount will only be valid for the current user and is "permanent".

oracle_base=/data/app/Oracle;                          Export Oracle_baseoracle_home= $ORACLE _base/product/12.1. 0/dbhome_1;      Export Oracle_homeoracle_sid=ORCL;                                       Export Oracle_sidpath= $ORACLE _home/bin: $PATH;                           Export PATH

Method Three: Add the variable in the/etc/profile file, which will be valid for all users under Linux and is "permanent".

oracle_base=/data/app/Oracle;                        Export Oracle_baseoracle_home= $ORACLE _base/product/12.1. 0/dbhome_1;    Export Oracle_homeoracle_sid=ORCL;                                     Export Oracle_sidpath= $ORACLE _home/bin: $PATH;                         Export PATH

Setting Oracle environment variables under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.