Operating System - HP-UX
1825161 Members
2333 Online
109679 Solutions
New Discussion юеВ

How to get sql prompt in HP UX

 
SOLVED
Go to solution

How to get sql prompt in HP UX

hi...
i want to access my database(oracle 9.2)through sql prompt,i tried this one
Login by oracle user(ie orasid)
change directory to ....
/oracle//920_64/bin.
$./sqlplus
it gives error message.
error 6 : initilizing SQL*PLUS
sp2-750 you may need to set ORACLE_HOME To your oracle software directory.
Now ,question is .. how to set ORACLE_HOME in oracle software directory to obtain sql prompt
9 REPLIES 9
Aneesh Mohan
Honored Contributor

Re: How to get sql prompt in HP UX

Hi Pankaj,

Make the below suitable entries in oracle user .profile file.

export ORACLE_BASE=/oracle/app/oracle
export ORACLE_DOC=$ORACLE_BASE/doc
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=CMCT1
export PATH=$ORACLE_HOME/bin:/usr/bin:/etc:/usr/bin/X11:/usr/local/bin:$PATH


Regards,
Aneesh
Suraj K Sankari
Honored Contributor

Re: How to get sql prompt in HP UX

Hi,

You need to set your .profile for ORACLE,
if you have any other box is having ORACLE just copy the .profile into this box.
I did the same thing onec

Suraj

Re: How to get sql prompt in HP UX

my .profile contains...
Example assumes /home/root exists.
set +u

JAVA_HOME=/opt/java1.4;export JAVA_HOME

PATH=/usr/sbin:$PATH:/sbin:/home/root
PATH=$JAVA_HOME/bin:$PATH:/tmp/sapinst_instdir/ECC50/SYSTEM/ABAP/ORA/UC/DB
export PATH
ORACLE_HOME=/oracle/GMD/920_64;export ORACLE_HOME
ORACLE_SID=GMD;export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib64:/usr/lib:$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/network/lib
export LD_LIBRARY_PATH
SHLIB_PATH=$ORACLE_HOME/lib:/usr/sap/GMD/SYS/exe/run:/oracle/GMD/920_64/lib:$ORACLE_HOME/network/lib:$ORACLE_HOME/precomp/lib:/sapmnt/GMD/exe
export SHLIB_PATH


i think almost all the things are define in this .profile file, but even now i cant access my sql prompt plz help me ,i am very much new to HPUX
Aneesh Mohan
Honored Contributor
Solution

Re: How to get sql prompt in HP UX

Pankaj,

Once you loged in execute the below steps.

$
$export ORACLE_HOME=/oracle/GMD/920_64
$export PATH=$PATH:$ORACLE_HOME/bin
$export ORACLE_SID=GMD
$sqlplus

If the things are working then please add the above export lines in your profile.

Regards,
Aneesh
Arturo Galbiati
Esteemed Contributor

Re: How to get sql prompt in HP UX

Hi,
. oraenv

allow you to setup teh correct Oracle environment. It should be in your patch definition, otherwise type the complete command path:

. /xxx/xxx/oraenv

HTH,
Art

Re: How to get sql prompt in HP UX

i have found a solution to this question
Thanks...
PatilS
Regular Advisor

Re: How to get sql prompt in HP UX

hi pankaj

can u plz provide me the solution to this problem.
Because i am getting the same error as well.
thanks in advance

regards
Sagar

Re: How to get sql prompt in HP UX

Hi Sagar,
Solution already provided by Aneesh,ie for sql prompt u have to set parameter in .profile file,this will permanent effect. but for testing if u want to make changes then just try on $prompt. ie considering the standard installtion...the parameter will be..
$export ORACLE_HOME=/oracle/SID/920_64
$export PATH=$PATH:$ORACLE_HOME/bin
$export ORACLE_SID=SID
$sqlplus "/ as sysdba" (for oracle 9i)
or
if orable 10g is uses... then
sqlplus /nolog
conn / as sydba

this will solve u r problem hopefully, unless if u have any gmail id then plz provide
Njoy..!



PatilS
Regular Advisor

Re: How to get sql prompt in HP UX

Hi Pankaj,
thanks for your reply.

I have thses parameters in .profile of oracle user
# This is the default standard profile provided to a user.
# They are expected to edit it to meet their own needs.

SHLIB_PATH=/opt/oracle/product/9.2.0/lib
PATH=/usr/bin::/opt/sfw/bin:/opt/sfw/gcc-3/bin:/opt/OV/bin:/opt/OV/bin/OpC:/usr/
sfw/bin:/u01/oracle/product/9.2.0/bin
NLS_LANG=american_america.WE8ISO8859P1
ORACLE_BASE=/u01/oracle
EDITOR=vi
LOGNAME=oracle
MAIL=/usr/mail/oracle
HOSTNAME=P360XCFYAP
ORACLE_SID=openview
SHELL=/bin/ksh
ORACLE_TERM=hp
HOME=/export/home/oracle
TERM=xterm
ORACLE_HOME=/u01/oracle/product/9.2.0
PWD=/export/home/oracle
TZ=Asia/Calcutta


but still when i am trying to use sqlplus it throws the same error.

$ sqlplus
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

do i need to modify the .profile file of solris root user. If yes then how to do it.I m stuck here since morning. your help will be very much appreciate.

my gmail id is sagarpat24@gmail.com and my office id is sagar.a.patil@relianceada.com