Oracle11g environment variable settings

Source: Internet
Author: User
After installing oracle11g in VMware7.14, sqlplus cannot be started. I searched the internet. It is estimated that the environment variable is not set. Current oracle Installation

After installing oracle 11 GB in VMware 7.14, it was found that sqlplus could not be started. I searched the internet. It is estimated that the environment variable is not set. Current oracle Installation

After installing Oracle 11 GB in VMware 7.14, it was found that sqlplus could not be started. I searched the internet. It is estimated that the environment variable is not set.

The current oracle is installed in/fantlam/oracle/app/oracle/product/11.2.0/dbhome_2.

(Differences between. bash_profile and. bashrc

/Etc/profile: This file sets the environment information for each user in the system. When the user logs on for the first time, this file is executed.
And collect shell settings from the configuration file in the/etc/profile. d directory.
/Etc/bashrc: execute this file for every user running bash shell. When bash shell is opened, the file is read.
~ /. Bash_profile: each user can use this file to enter the shell information dedicated to his/her use. When a user logs on,
The file is executed only once! By default, it sets some environment variables to execute the user's. bashrc file.
~ /. Bashrc: This file contains bash information dedicated to your bash shell. When you log on and every time you open a new shell,
The file is read.
~ /. Bash_logout: execute this file every time you exit the system (exit bash shell.

In addition, the variables (global) set in/etc/profile can act on any user ~ The variables (local) set in/. bashrc can only inherit the variables in/etc/profile. They are "Parent-Child" relationships.

~ /. Bash_profile is interactive and login to run in bash.
~ /. Bashrc runs in bash in interactive non-login mode.
Generally, the two settings are roughly the same, so the former usually calls the latter .)
Reset the environment variable.

-- Use vi. profile to edit the file after logging on as an oracle user

ORACLE_BASE =/fantlam/oracle/app/oracle
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_2
ORACLE_SID = fantlam
PATH = $ ORACLE_HOME/bin: $ PATH
ORACLE_OWNER = oracle
Export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH ORACLE_OWNER
-- Execute source. profile to make the environment variable take effect.

-- After the settings are complete, use sqlplus to log on to the database.

Enter the user name and password when logging in. I don't know what the user name and password are. I can search online to solve this problem.

Write in the username as follows:

Sys/password as sysdba
Login successful

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.