cancel
Showing results for 
Search instead for 
Did you mean: 

ORACLE_HOME undefined variable : unable to start SAP

Former Member
0 Kudos

Dear Experts

I installed SAP ECC6.0 with ORACLE10g in my HP-UX 11.31 box successfully. But I am unable to start and stop the SAP with <SID>adm by using startsap command.

I am able to start and stop oracle and sap individually. When i am using starsap command sap is able to start but it is not connecting the database.

While I am logging with <SID>adm and ora<SID> I am getting below message

ORACLE_HOME undefined variable

While before starting oracle installation i got the below message

ORACLE_HOME is undefined

ORACLE_SID is undefined

ORACLE_BASE is undefined

ORACLE_STAGE is undefined

Then I entered above environment variables dynamically and I started installing oracle.

Before starting SAP and oracle installation I copied the root env file from other HP-UX box which is same OS version(11.31) , as my original env file was corrupted.

___________________________________________________________________

_________________

My ora<SID> env file is like this

% su - oraec6

Password:

ORACLE_HOME: Undefined variable.

-


% env

HOME=/oracle/EC6

PATH=/usr/bin

LOGNAME=oraec6

SHELL=/usr/bin/csh

TERM=xterm

COLUMNS=157

LINES=46

%

My <SID>adm env file is like this

% su - ec6adm

Password:

ORACLE_HOME: Undefined variable.

-


% env

HOME=/home/ec6adm

PATH=/usr/bin

LOGNAME=ec6adm

SHELL=/usr/bin/csh

TERM=xterm

COLUMNS=157

LINES=46

%

Root user env file is like this

  1. env

_=/usr/bin/env

MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/ldapux/share/man/%L:/opt/ldapux/share/man:/opt/ipf/man:/opt/ldapux/ypldapd/man:/opt/samba/man:/opt/sa

mba/WTEC_Support_Tools/man:/opt/samba/cfsm_man:/opt/cifsclient/share/man:/op

t/openssl/man:/opt/openssl/prngd/man:/opt/wbem/share/man:/opt/graphics/common

/man:/opt/amgr/man:/opt/amgr/man/%L:/opt/sec_mgmt/share/man:/usr/dt/share/man:/opt/caliper/man/%L:/opt/caliper/man:/opt/drd/share/man/%L:/opt/drd/share/man:/opt/dsau/man:/opt/resmon/share/man/%L:/opt/resmon/share/man:/opt/gnome/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/usr/contrib/kwdb/share/man:/opt/perl_32/man:/opt/perl_64/ma

n:/opt/prm/man/%L:/opt/prm/man:/opt/sfmdb/pgsql/man:/opt/sfm/share/man:/opt/swm/share/man/%L:/opt/swm/share/man:/opt/swa/share/man/%L:/opt/swa/share/man:/opt/ssh/share/man:/opt/sentinel/man/%L:/opt/sentinel/man:/opt/VRTS/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/gwlm/man/%L:/opt/gwlm/man

PATH=/opt/java1.4/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bi

n:/opt/perl/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbi

n:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11

:/opt/sec_mgmt/bastille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/op

t/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/usr/contrib/kwdb/bin:/opt/mozill

a:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgm

t/spc/bin:/opt/ssh/bin:/opt/sentinel/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/op

t/langtools/bin:/opt/gwlm/bin:/sbin:/home/root

COLUMNS=157

EDITOR=vi

LOGNAME=root

ORACLE_SID=EC6

ERASE=^H

SAPINST_JRE_HOME=/opt/java1.4/jre

TNS_ADMIN=/oracle/EC6/102_64

SHELL=/sbin/sh

JAVA_HOME=/opt/java1.4

HOME=/

LD_LIBRARY_PATH=/oracle/EC6/102_64/lib:/sapmnt/EC6/exe

TERM=xterm

ORACLE_HOME=/oracle/EC6/102_64

PWD=/

TZ=IST-5:30

LINES=46

My password file is like this

  1. more passwd

root:xTJErm.a8LWnc:0:3::/:/sbin/sh

daemon:*:1:5::/:/sbin/sh

bin:*:2:2::/usr/bin:/sbin/sh

sys:*:3:3::/:

adm:*:4:4::/var/adm:/sbin/sh

uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico

lp:*:9:7::/var/spool/lp:/sbin/sh

nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico

hpdb:*:27:1:ALLBASE:/:/sbin/sh

nobody:*:-2:-2::/:

www:*:30:1::/:

smbnull:*:101:101:DO NOT USE OR DELETE - needed by Samba:/var/opt/samba/nologin:/bin/false

cimsrvr:*:102:102:WBEM Services:/var/opt/wbem:/sbin/sh

tftp:*:103:103:Trivial FTP user:/home/tftp:/usr/bin/false

sfmdb:*:104:20::/home/sfmdb:/sbin/sh

sshd:*:105:104:sshd privsep:/var/empty:/bin/false

iwww:*:106:1::/home/iwww:/sbin/sh

owww:*:107:1::/home/owww:/sbin/sh

hpsmh:*:108:105:System Management Homepage:/var/opt/hpsmh:/sbin/sh

ec6adm:R3fICsNjv47UM:109:107:SAP System Administrator:/home/ec6adm:/usr/bin/csh

oraec6:R3fICsNjv47UM:110:108:SAP Database Administrator:/oracle/EC6:/usr/bin/csh

Now my question is

Is it require to include any environment variables for users <SID>adm and ora<SID> in .profile

Thanks in advance

Laxmi deepak Keesara

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Dear Rajan,

Thak your for your reply,

Actually My CI and DI on single host (same box)

event thourhg i am facing the problem while starting the SAP

first i started listner and then started the DB by using SQL plus

after database is open , i tried to start the SAP from SIDADM user i am getting the same message

% startsap

Database db must be started on remote server

Log on to remote server and start database

when execute R3trans -d it is giving me the error msg like this

% R3trans -d

Could not open the ICU common library.

The following files must be in the path described by

the environment variable "LD_LIBRARY_PATH":

libicuuc.sl.30, libicudata.sl.30, libicui18n.sl.30 [nlsui0.c 1553] pid = 15432

in above case it is not generating any trans log in root directory

but when i tried the same command from run

% cd /usr/sap/EC6/SYS/exe/run

% R3trans -d

This is R3trans version 6.14 (release 701 - 26.01.09 - 12:46:00).

unicode enabled version

2EETW169 no connect possible: "environment variable DIR_LIBRARY is not set."

R3trans finished (0012).

this is my TRANS.LOG

more trans.log

4 ETW000 R3trans version 6.14 (release 701 - 26.01.09 - 12:46:00).

4 ETW000 unicode enabled version

4 ETW000 ===============================================

4 ETW000

4 ETW000 date&time : 23.10.2010 - 17:59:31

4 ETW000 control file: <no ctrlfile>

4 ETW000 R3trans was called as follows: R3trans -d

4 ETW000 trace at level 2 opened for a given file pointer

4 ETW000 [dev trc ,00000] Sat Oct 23 17:59:31 2010

203 0.000203

4 ETW000 [dev trc ,00000] db_con_init called

26 0.000229

4 ETW000 [dev trc ,00000] create_con (con_name=R/3)

90 0.000319

4 ETW000 [dbcon.c ,00000] *** ERROR => Invalid profile parameter dbms/type

(or environment variable dbms_type) = <undef>, cannot load DB library

4 ETW000

81 0.000400

2EETW169 no connect possible: "environment variable DIR_LIBRARY is not set."

...skipping...

4 ETW000 R3trans version 6.14 (release 701 - 26.01.09 - 12:46:00).

4 ETW000 unicode enabled version

4 ETW000 ===============================================

4 ETW000

4 ETW000 date&time : 23.10.2010 - 17:59:31

4 ETW000 control file: <no ctrlfile>

4 ETW000 R3trans was called as follows: R3trans -d

4 ETW000 trace at level 2 opened for a given file pointer

4 ETW000 [dev trc ,00000] Sat Oct 23 17:59:31 2010 203 0.000203

4 ETW000 [dev trc ,00000] db_con_init called 26 0.000229

4 ETW000 [dev trc ,00000] create_con (con_name=R/3) 90 0.000319

4 ETW000 [dbcon.c ,00000] *** ERROR => Invalid profile parameter dbms/type (or environment variable dbms_type) = <undef>, cannot load DB library

4 ETW000 81 0.000400

2EETW169 no connect possible: "environment variable DIR_LIBRARY is not set."

Thanks & Regards

Laxmi deepak keesara

Former Member
0 Kudos

Hi,

Two things are very clear from the trans log.

4 ETW000 http://dbcon.c ,00000 *** ERROR => Invalid profile parameter dbms/type (or environment variable dbms_type) = <undef>, cannot load DB library

4 ETW000 81 0.000400

2EETW169 no connect possible: "environment variable DIR_LIBRARY is not set."

Please maintain the right values for the following two variables and then try to start SAP.

setenv DIR_LIBRARY /usr/sap/<SID>/SYS/exe/run

setenv dbms_type ora

Also set the profile parameter dbms/type to ora in the default profile.

Hope this resolves ur issue.

Regards,

Varadharajan M

Former Member
0 Kudos

Dear Rajan,

I tried it from all the options, finally my Database is opening but the thing is when i am trying to start SAP i am getting below message

Database EC6 must be started on remote server.

log on to remote server and start database

but database is in up and running..even though i am getting the above message

i executed the command R3trans -d it is giving me return code 0000

is it problem with environment variables or some thing else?

Thnak & Regards

Deepak

Former Member
0 Kudos

Hi,

Have a look at the [thread|;. Also post the trans log after executing R3trans -d.

Regards,

Varadharajan M

Former Member
0 Kudos

Thank you for your replys,

Hi, Rajan

i maintained the environment variables ORACLE_HOME, ORACLE_STAGE, ORACLE_SID, ORACLE_BASE in .login file for both users <SID>ADM and ORA<SID>

Thanks & Regards

Laxmideepak keesara

Former Member
0 Kudos

Hi,

These env variables must be set in the following files(which are available in the home directory of the users).

.dbenv_<hostname>.sh

.dbenv_<hostname>.csh

.sapenv_<hostname>.sh

.sapenv_<hostname>.csh

As mentioned in the earlier post have a look at the [SAP Note 602843 - Environment settings for R/3/Oracle on UNIX|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=602843]. This will give u more idea about the env variables for the above said OS/DB combination.

Hope this helps.

Regards,

Varadharajan M

Former Member
0 Kudos

Hi,

Have u tried to set the env variable ORACLE_HOME for the users <SID>ADM and ORA<SID>. if niot set the env variable once and then try to execute startsap.

Hope this will solve ur issue.

Regards,

Varadharajan M

former_member189546
Active Contributor
0 Kudos

Hello,

Make sure that all envoirnment variables are set as per SAP Note

602843 - Environment settings for R/3/Oracle on UNIX

regards,

John Feely

Former Member
0 Kudos

There are other scripts getting call from .profile for example.

. $HOME/.dbenv.sh

. $HOME/.sapenv.sh

etc

make sure you have .dbenv.sh which has all the database related env variables.