Oracle Database - oraenv and coraenv script to set Linux environment variable

About

This section describes how to set a common operating system environment (environment variable) by using the oraenv or coraenv scripts, depending on the default shell:

  • For the Bourne, Bash, or Korn shell, use the oraenv command.
  • For the C shell, use the coraenv command.

Do not call the oraenv or coraenv script from the Oracle software owner (typically, oracle) user's shell startup script. Because these scripts prompt for values, they can prevent the dbstart script from starting a database automatically when the system starts.

The oraenv or coraenv script is usually called from the user's shell startup file (for example, .profile or .login). It sets the ORACLE_SID and ORACLE_HOME environment variables and includes the $ORACLE_HOME/bin directory in the PATH environment variable setting.

The oraenv and coraenv scripts are created during installation. These scripts set environment variables based on the contents of the oratab file and provide:

  • A central means of updating all user accounts with database changes
  • A mechanism for switching between databases specified in the oratab file

Articles Related

To switch between databases

You may find yourself frequently adding and removing databases from the development system or your users may be switching between several different Oracle Databases installed on the same system. You can use the oraenv or coraenv script to ensure that user accounts are updated and to switch between databases.

When switching between databases, users can run the oraenv or coraenv script to set these environment variables.

How to run the script

To run one of these scripts, use the appropriate command:

  • coraenv script:
% source /usr/local/bin/coraenv
  • oraenv script:
$ . /usr/local/bin/oraenv

Documentation / Reference

  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at del.icio.us
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Digg
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Ask
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Google
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at StumbleUpon
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Technorati
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Live Bookmarks
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Yahoo! Myweb
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Facebook
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Yahoo! Bookmarks
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at Twitter
  • Bookmark "Oracle Database - oraenv and coraenv script to set Linux environment variable" at myAOL
 
database/oracle/oraenv.txt · Last modified: 2010/10/31 14:00 by gerardnico