cancel
Showing results for 
Search instead for 
Did you mean: 

ORACLE_HOME not coming into effect when checked from OS level for adm user

0 Kudos

Hello SAP Experts,

I am facing an issue where DB13 job UpdateStats is not working. When checked at OS level for the env variable for <sid>adm user ORACLE_HOME, its says variable undefined. I have added the correct value for .dbenv.csh , .dbenv_hostname.csh, and also took a restart of application server, but ORACLE_HOME still is undefined for <sid>adm user. Please suggest if anyone has faced this solution and help.

Accepted Solutions (1)

Accepted Solutions (1)

JamesZ
Advisor
Advisor

After changing .profile, we need to stopsap, kill os process sapstartsrv, startsap.
Did you try this? If already did it, then you need to double check whether all .csh, and all .sh are correctly changed.

Or we use option two, which is more easy to get rid of OS shell... And option two is the most top level.

0 Kudos

Hi James, I tried the second option of note 1827566, setting the environment variable by maintaining it in the profile parameter as SETENV_XX = ORACLE_HOME=/oracle/<SID>/<version>. After the full restart of the application including sapstartsrv, ENV variable ORACLE_HOME was updated when checked from SM51.

Thanks for your help.

But it still remains a mystery why .dbenv.sh , .dbenv_<hostname>.sh were not able to set the env variable. Permissions for these were 640 and owner as <sid>adm:sapsys, which seemed to be fine to me.

Answers (2)

Answers (2)

JamesZ
Advisor
Advisor

db13 has "difference" compared with OS direct run, please check sap doc 2965077.
To change environment variable, you can refer to sap doc 1827566.
So we need to restart sapstarsrv to reflect to SAP.

0 Kudos

Hi James,

thanks a lot for your response. Those notes are informative.

From note 2965077, I understood that DB13 from OS and application can be different.

Also, from 1827566, I understood that env variables can be changed it two ways: i. from OS Level ii. using profile parameter.

I tried the first option and changed the entries in .dbenv.csh, .dbenv_hostname.csh and took complete restart of the application (including sapstartsrv), but env variable ORACLE_HOME did not reflect correctly , when checked from application level as well.

I have not tried the option two.

One thing to note is, in some system option one worked, but in some other it is not working. I wish to correct ORACLE_HOME using first option only.

JamesZ
Advisor
Advisor
0 Kudos

<
But it still remains a mystery why .dbenv.sh , .dbenv_<hostname>.sh were not able to set the env variable. Permissions for these were 640 and owner as <sid>adm:sapsys, which seemed to be fine to me.

>

Have no idea on .sh profile change, not linux expert.. Maybe you can tag os area in this disucssion, or ask OS admin to help.