oracle-sqlplus-linux

in my linux terminal
it is like this
mathew@mathew-Inspiron-1501:

I want to change to one like this
for running sqlplus

oracle@mathew-Inspiron-1501:/home/mathew$ export ORACLE_SID=orcl

could you please help me
how would we achieve oracle@mathew
in the beginning..................
nobleitAsked:
Who is Participating?
 
slightwv (䄆 Netminder) Commented:
>>export PATH=$PATH:ORACLE_HOME/bin


Should be:
export PATH=$PATH:$ORACLE_HOME/bin
0
 
upanwarCommented:
This is showing.

mathew@mathew-Inspiron-1501

Because you are logged in with user mathew. This get changed with different user. Like if you would login with root then it would be

root@mathew-Inspiron-1501
0
 
upanwarCommented:
If you still want to change your command prompt then below given url would be useful for you. If you still require further help for the same then update us.

http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
nobleitAuthor Commented:
can i use

echo $ORACLE_HOME
0
 
OP_ZaharinCommented:
- hope this link helps you to get started.:
http://rene.bz/oracle-sqlplus-and-linux/
http://www.phppop.net/d/node/147 (skip the instant client installation and directly to step 3 and 4)
0
 
OP_ZaharinCommented:
0
 
nobleitAuthor Commented:
This is what I did,

mathew@mathew-Inspiron-1501:~$ export ORACLE_SID=orcl
mathew@mathew-Inspiron-1501:~$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
mathew@mathew-Inspiron-1501:~$ export PATH=$PATH:ORACLE_HOME/bin
mathew@mathew-Inspiron-1501:~$ sqlplus /nolog
sqlplus: command not found
mathew@mathew-Inspiron-1501:~$ sqlplus
sqlplus: command not found
mathew@mathew-Inspiron-1501:~$

for sure I did sqlplus last boot and this time I cannot
Could you please help me to resolve...
0
 
OP_ZaharinCommented:
can you check and confirm that ORACLE_HOME(the u01/....)/bin path is correct? and does sqlplus application exist in there?
0
 
nobleitAuthor Commented:
/u01/app/oracle/product/11.2.0/dbhome_1

I could see every thing in this path
including bin

is this the one which you are expecting
everything is here


mathew@mathew-Inspiron-1501:~$ cd /
mathew@mathew-Inspiron-1501:/$ ls
bin    etc             lib         opt   selinux  u01      vmlinuz.old
boot   home            lost+found  proc  srv      usr
cdrom  initrd.img      media       root  sys      var
dev    initrd.img.old  mnt         sbin  tmp      vmlinuz
mathew@mathew-Inspiron-1501:/$ cd /u01/app/oracle/product/11.2.0/dbhome_1
mathew@mathew-Inspiron-1501:/u01/app/oracle/product/11.2.0/dbhome_1$ ls
apex         emcli                      md           precomp
assistants   EMStagePatches_orcl        mesg         racg
bin          has                        mgw          rdbms
ccr          hs                         network      relnotes
cdata        ide                        nls          root.sh
cfgtoollogs  install                    oc4j         scheduler
clone        install.platform           odbc         slax
config       instantclient              olap         sqldeveloper
crs          inventory                  ons          sqlj
csmig        j2ee                       OPatch       sqlplus
css          javavm                     opmn         srvm
ctx          jdbc                       oracore      sysman
cv           jdev                       oraInst.loc  timingframework
dbs          jdk                        ord          ucp
dc_ocm       jlib                       oui          uix
deinstall    ldap                       owb          utl
demo         lib                        owm          wwg
diagnostics  log                        perl         xdk
dv           mathew-Inspiron-1501_orcl  plsql
mathew@mathew-Inspiron-1501:/u01/app/oracle/product/11.2.0/dbhome_1$
0
 
nobleitAuthor Commented:
Also


mathew@mathew-Inspiron-1501:/u01/app/oracle/product/11.2.0/dbhome_1$ ls -l
total 316
drwxr-xr-x  8 oracle oinstall  4096 2011-04-25 04:10 apex
drwxr-xr-x  8 oracle oinstall  4096 2011-04-25 04:07 assistants
drwxr-xr-x  2 oracle oinstall 12288 2011-04-25 04:13 bin
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:11 ccr
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:11 cdata
drwx------  4 oracle oinstall  4096 2011-04-25 04:34 cfgtoollogs
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:10 clone
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:11 config
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:07 crs
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 csmig
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:11 css
drwxr-xr-x 10 oracle oinstall  4096 2011-04-25 04:11 ctx
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:07 cv
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:27 dbs
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:10 dc_ocm
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:13 deinstall
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 demo
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 diagnostics
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:07 dv
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 emcli
drwxr-x--- 68 oracle oinstall  4096 2011-04-25 04:31 EMStagePatches_orcl
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 has
drwxr-xr-x  5 oracle oinstall  4096 2011-04-25 04:13 hs
drwxr-xr-x  8 oracle oinstall  4096 2011-04-25 04:07 ide
drwxr-xr-x  8 oracle oinstall  4096 2011-04-25 04:32 install
-rw-r--r--  1 oracle oinstall    37 2011-04-25 04:07 install.platform
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:09 instantclient
drwxrwx--- 13 oracle oinstall  4096 2011-04-25 04:17 inventory
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:10 j2ee
drwxr-xr-x  8 oracle oinstall  4096 2011-04-25 04:07 javavm
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:11 jdbc
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:07 jdev
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:11 jdk
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:10 jlib
drwxr-xr-x 12 oracle oinstall  4096 2011-04-25 04:11 ldap
drwxr-xr-x  4 oracle oinstall 12288 2011-04-25 04:13 lib
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:18 log
drwxr-----  3 oracle oinstall  4096 2011-04-25 04:31 mathew-Inspiron-1501_orcl
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:07 md
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:08 mesg
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:11 mgw
drwxr-xr-x 11 oracle oinstall  4096 2011-04-25 04:13 network
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:07 nls
drwxr-xr-x 20 oracle oinstall  4096 2011-04-25 04:09 oc4j
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:07 odbc
drwxr-xr-x  5 oracle oinstall  4096 2011-04-25 04:07 olap
drwxr-xr-x  5 oracle oinstall  4096 2011-04-25 04:07 ons
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:11 OPatch
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:11 opmn
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:07 oracore
-rw-r-----  1 oracle oinstall    56 2011-04-25 04:07 oraInst.loc
drwxr-xr-x  8 oracle oinstall  4096 2011-04-25 04:07 ord
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:11 oui
drwxr-xr-x 26 oracle oinstall  4096 2011-04-25 04:11 owb
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:07 owm
drwxr-xr-x  5 oracle oinstall  4096 2011-04-25 04:13 perl
drwxr-xr-x  6 oracle oinstall  4096 2011-04-25 04:07 plsql
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:07 precomp
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:11 racg
drwxr-xr-x 13 oracle oinstall  4096 2011-04-25 04:13 rdbms
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:11 relnotes
-rwxr-x---  1 oracle oinstall   518 2011-04-25 04:13 root.sh
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:07 scheduler
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 slax
drwxr-xr-x 13 oracle oinstall  4096 2011-04-25 04:10 sqldeveloper
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 sqlj
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:12 sqlplus
drwxr-xr-x 10 oracle oinstall  4096 2011-04-25 04:11 srvm
drwxr-xr-x 15 oracle oinstall  4096 2011-04-25 04:11 sysman
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:09 timingframework
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:11 ucp
drwxr-xr-x  4 oracle oinstall  4096 2011-04-25 04:07 uix
drwxr-xr-x  2 oracle oinstall  4096 2011-04-25 04:08 utl
drwxr-xr-x  3 oracle oinstall  4096 2011-04-25 04:07 wwg
drwxr-xr-x  7 oracle oinstall  4096 2011-04-25 04:09 xdk
mathew@mathew-Inspiron-1501:/u01/app/oracle/product/11.2.0/dbhome_1$
0
 
OP_ZaharinCommented:
- sorry the correct link is: http://www.experts-exchange.com/Database/Oracle/11.x/Q_24392991.html?sfQueryTermInfo=1+10+30+linux+plu+sql

- yes the export path pointed by slightwv should work.
0
 
underskyCommented:
You can run it manualy:

look

sudo (or) su via root

# su oracle
cd $oraclehome (that must been home of your oracle directory)
and run:
bin/sqlplus
or sqlplus
(if you set export $oraclehome right, must work, if you get command not found: go to bin directory inside oracle home. and run

sqlplus  there


also you may be need RUN AS SYSDBA, for maintain bases.
0
 
slightwv (䄆 Netminder) Commented:
>>cd $oraclehome (that must been home of your oracle directory)

I believe it is $ORACLE_HOME

There should also be no need to cd into the directory to run sqlplus.
0
 
nobleitAuthor Commented:
now the issue
is this

mathew@mathew-Inspiron-1501:~$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon May 2 10:27:17 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn / as sysdba
ERROR:
ORA-01031: insufficient privileges


SQL>
0
 
slightwv (䄆 Netminder) Commented:
>>now the issue is this

Different question and if the below comment doesn't answer this, you should really ask it as a new question.

The user you are logged into is NOT a member of the dba unix group.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.