Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install oracle setting variables

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to install oracle setting variables, the article is very detailed, has a certain reference value, interested friends must read it!

1. Manual method

2.oraenv tool

3.oraset script

Create oraset under / etc/ with permissions set to chown oracle:oinstall / etc/oraset

Oraset content:

#! / bin/bash

# Sets Oracle environment variables.

# Setup: 1. Put oraset file in / etc (Linux), in / var/opt/oracle (Solaris)

# 2. Ensure / etc or / var/opt/oracle is in $PATH

# Usage: batch mode:. Oraset

# menu mode:. Oraset

# =

If [- f / etc/oratab]; then

OTAB=/etc/oratab

Elif [- f / var/opt/oracle/oratab]; then

OTAB=/var/opt/oracle/oratab

Else

Echo 'oratab file not found.'

Exit

Fi

#

If [- z $1]; then

SIDLIST=$ (egrep-v'# |\ *'${OTAB} | cut-F1-d:)

# PS3 inmdicates the prompt to be used for the Bash select command.

PS3='SID?'

Select sid in ${SIDLIST}; do

If [- n $sid]; then

HOLD_SID=$sid

Break

Fi

Doneelse

If egrep-v'# |\ * ${OTAB} | grep-w "${1}:" > / dev/null; then

HOLD_SID=$1

Else

Echo "SID: $1 not found in $OTAB"

Fi

Shiftfi

#

ORACLE_SID=$HOLD_SID

Export ORACLE_SID

Export ORACLE_HOME=$ (egrep-v'# |\ *'${OTAB} | grep-w $ORACLE_SID: | cut-f2-d:)

Export ORACLE_BASE=$ {ORACLE_HOME%%/product*}

Export TMP=$ORACLE_BASE/../tmp

Export TMPDIR=$TMP

Export TNS_ADMIN=$ORACLE_HOME/network/admin

Export ADR_BASE=$ORACLE_BASE/diag

Export PATH=$PATH:$ORACLE_HOME/bin

Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

Then add to the .bashrc of the oracle user:

Source / etc/oraset xxxx

Note:

1. Xxxx is your SID name.

two。 The path is subject to personal installation.

The above is all the contents of the article "how to install oracle setting variables". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report