Exadata General (MOSC)

MOSC Banner

how to set dynamic variable whose value depends on another variable value

edited Nov 27, 2020 9:23PM in Exadata General (MOSC) 5 commentsAnswered

Hello

Greetings

For X7+ & Oracle Linux Server release 7.7+

I want to set up a dynamic variable for OSUser environment..

for Example:

if my DB_NAME is xyz, ORACLE_SIDs i will have is xyz[1-4].. if have multiple databases running on same host every time i switch environment i have to set DB_NAME to go to alert locations & other things..

i would like to set DB_NAME=${ORACLE_SID%?} globally as such that,

if i set ORACLE_SID=xyz2, my DB_NAME gets set to xyz

& if i change ORACLE_SID=abc2, it gets updated to abc


I would like to avoid while loop running infinitely if possible..

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center