System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

unable to start and stop SAP in HP-UX 11.31

laxmideepak
Occasional Visitor

unable to start and stop SAP in HP-UX 11.31

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 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 adm and ora 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 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 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
# 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/samba/WTEC_Support_Tools/man:/opt/samba/cfsm_man:/opt/cifsclient/share/man:/opt/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/man:/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/bin:/opt/perl/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/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:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/usr/contrib/kwdb/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/sentinel/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/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
# 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 adm and ora in .profile


Thanks in advance
Laxmi deepak Keesara
13 REPLIES
Dennis Handly
Acclaimed Contributor

Re: unable to start and stop SAP in HP-UX 11.31

>% su - oraec6
ORACLE_HOME: Undefined variable.

When you do "su -", it ignores any env variables you have already set.

>Root user env file is like this

This isn't going to help user oraec6.

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

It sure looks like it.
V. Nyga
Honored Contributor

Re: unable to start and stop SAP in HP-UX 11.31

Hi,

>ora env
and
>SID>adm env :
SHELL=/usr/bin/csh

Root user env :
SHELL=/sbin/sh

For c-shell you have to use .cshrc to define variables with:
setenv ORACLE_HOME /oracle/EC6/102_64

(OR - define the variables in the start script, so it's user independent)

V.
*** Say 'Thanks' with Kudos ***
k.l.deepak
Occasional Visitor

Re: unable to start and stop SAP in HP-UX 11.31

Hi Dennis

Thank you for your replay

where should i maintain below env variables

ORACLE_HOME
ORACLE_SID
ORACLE_BASE
ORACLE_STAGE

for users adm and ORA


Thanks in advance
Laxmideepak keesara
Dennis Handly
Acclaimed Contributor

Re: unable to start and stop SAP in HP-UX 11.31

>where should I maintain below env variables
>ORACLE_HOME ORACLE_SID ORACLE_BASE ORACLE_STAGE
>for users adm and ORA

In the .profile or .login for those users.
k.l.deepak
Occasional Visitor

Re: unable to start and stop SAP in HP-UX 11.31

Dear dennis,
Thank you for your replay

ORACLE_HOME,ORACLE_BASE,ORACLE_SID,ORACLE_STAGE.
the above env files are already there in .login file for both users

those all are like this
su - oraec6
ORACLE_HOME undefined variable
%more .login
_____________________________________________
# SAP environment
set path = ($ORACLE_HOME/bin $path)
setenv JAVA_HOME /opt/java1.4
setenv SAPSYSTEMNAME EC6
setenv ORACLE_BASE /oracle
setenv ORACLE_SID EC6
setenv ORACLE_HOME /oracle/EC6/102_64
setenv SAPDATA_HOME /oracle/EC6
setenv LIBRARY_PATH /oracle/EC6/102_64/lib
setenv SHLIB_PATH /oracle/EC6/102_64/lib:$SHLIB_PATH
___________________________________________

su - ec6adm
ORACLE_HOME Undefined variable
%more .login
_____________________________________________
# SAP environment

setenv JAVA_HOME /opt/java1.4
setenv SAPSYSTEMNAME EC6
setenv ORACLE_BASE /oracle
setenv ORACLE_SID EC6
setenv ORACLE_HOME /oracle/EC6/102_64
setenv SAPDATA_HOME /oracle/EC6
setenv LIBRARY_PATH /oracle/EC6/102_64/lib
setenv SHLIB_PATH /oracle/EC6/102_64/lib:$SHLIB_PATH
____________________________________________

Thanks and Regards
Laxmideepak keesara
V. Nyga
Honored Contributor

Re: unable to start and stop SAP in HP-UX 11.31

Hi again,

you get:
ORACLE_HOME undefined variable

That's because you ask for $ORACLE_HOME in the first line (set path) before you define the variable in line 6 (setenv ORACLE_HOME /oracle/EC6/102_64)

>%more .login
>_____________________________________________
># SAP environment
>set path = ($ORACLE_HOME/bin $path) <- line 1
>setenv JAVA_HOME /opt/java1.4
>setenv SAPSYSTEMNAME EC6
>setenv ORACLE_BASE /oracle
>setenv ORACLE_SID EC6
>setenv ORACLE_HOME /oracle/EC6/102_64 <- line 6

V.
*** Say 'Thanks' with Kudos ***
Steven E. Protter
Exalted Contributor

Re: unable to start and stop SAP in HP-UX 11.31

Shalom Laxmi,

Your start up script needs to set all variables such as ORACLE_HOME. Alternatively the .profile for the user can take care of this.

But the errors are accurate. Your current start methodology does not tell the start up script where the database binaries and such are.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
k.l.deepak
Occasional Visitor

Re: unable to start and stop SAP in HP-UX 11.31

Salaam Steven and VN,
Thank you all for replys

Steven i did not get your point because i am a just beginner in HP-UX


But the errors are accurate. Your current start methodology does not tell the start up script where the database binaries and such are.>

Can you please explain me in brief and please guide me where i can maintain ORACLE and SAP environment variables for both the users ADM and ORA. .login profile contains the environment variables for both the users, as i mention above

as V said setpath $ORACLE_HOME/bin can be deleted right



Thanks in advance
Laxmideepak kessara

V. Nyga
Honored Contributor

Re: unable to start and stop SAP in HP-UX 11.31

Hi again,

>as V said setpath $ORACLE_HOME/bin can be deleted right

No, not deleted, but set after setenv ORACLE_HOME

So, in your .login should be:

setenv JAVA_HOME /opt/java1.4
setenv SAPSYSTEMNAME EC6
setenv ORACLE_BASE /oracle
setenv ORACLE_SID EC6
setenv ORACLE_HOME /oracle/EC6/102_64
setenv SAPDATA_HOME /oracle/EC6
setenv LIBRARY_PATH /oracle/EC6/102_64/lib
setenv SHLIB_PATH /oracle/EC6/102_64/lib:$SHLIB_PATH
set path = ($path $ORACLE_HOME/bin)

Please note that for this line:
setenv SHLIB_PATH /oracle/EC6/102_64/lib:$SHLIB_PATH

you need an existing variable SHLIB_PATH before! Else you'll get an error again ('SHLIB_PATH: Undefined variable.')

Then just use:
setenv SHLIB_PATH /oracle/EC6/102_64/lib

HTH
V.
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: unable to start and stop SAP in HP-UX 11.31

>as V said set path $ORACLE_HOME/bin can be deleted right

No, just moved down:
# SAP environment
...
setenv ORACLE_HOME /oracle/EC6/102_64
...
set path = ($ORACLE_HOME/bin $path)
V. Nyga
Honored Contributor

Re: unable to start and stop SAP in HP-UX 11.31

Hi again,

alternatively create a script to set variables and call startsap after that.
So any user can start this without you have to change his .login file first.

See attachment.

HTH
V.
*** Say 'Thanks' with Kudos ***
k.l.deepak
Occasional Visitor

Re: unable to start and stop SAP in HP-UX 11.31

Hi V,

Thanks a lot for your replys

as you said i adjusted env variabl like this in .login file

# SAP environment

setenv JAVA_HOME /opt/java1.4
setenv SAPSYSTEMNAME EC6
setenv ORACLE_BASE /oracle
setenv ORACLE_SID EC6
setenv ORACLE_HOME /oracle/EC6/102_64
setenv SAPDATA_HOME /oracle/EC6
setenv LIBRARY_PATH /oracle/EC6/102_64/lib
setenv SHLIB_PATH /oracle/EC6/102_64/lib:$SHLIB_PATH
set path = ($path $ORACLE_HOME/bin)

even though i am getting the same error
ORACLE_HOME is undefined while i am loging with ORA

and one more thing where i want to place the attached file which was sent by you.

Thank you in adavane
Keesara laxmideepak
V. Nyga
Honored Contributor

Re: unable to start and stop SAP in HP-UX 11.31

Hi again,

I can't reproduce this - please double check spelling and user .login place.

For testing you also can insert
echo start
before your
# SAP environment

and

echo stop

behind the block of 'setenv'.

Is the error message before of after an echo output?

Can you post output of 'env'?

>where i want to place the attached file which was sent by you.

First you can place it in the home directory of the user.
Then start it with './'

V.
P.S.
Maybe you should ask an UX-admin in your company?
*** Say 'Thanks' with Kudos ***