Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

COMMAND NOT FOUND - ORACLE GRID

Ujjwal RanaDec 27 2015 — edited Jan 8 2016

Hello Everyone,

While typing any of the below mentioned command I received command not found. I wonder what could be the reason. I have installed ORACLE GRID on my test server. Also Please feel free to check bash_profile output for grid from below :-

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

[grid@storage Desktop]$ asmca

bash: asmca: command not found

[grid@storage Desktop]$ lsnrctl status

bash: lsnrctl: command not found

[grid@storage Desktop]$

[grid@storage Desktop]$ vi ~/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=+ASM; export ORACLE_SID

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/common/oracle/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

Also you might need to check ORACLE USER .bash_profile OUTPUT as well. Below is an OUTPUT

[oracle@storage ~]$  vi ~/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=orcl; export ORACLE_SID

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/common/oracle/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

This post has been answered by Ujjwal Rana on Jan 8 2016
Jump to Answer

Comments

Pavan Kumar

Hi,

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

what is $HOME/bin ?

A semicolon ends for every setting which is missing as per my knowledge
Try below method, add new variables at start and append the current variable of paths to last (good way)

PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH

Hope it works

- Pavan  Kumar N

Ujjwal Rana

Hi Pavan,

I did that and refresh the bash_profile but still the same thing occured : COMMAND NOT FOUND.. Please feel free to check the screenshot below

[grid@storage Desktop]$ source ~/.bash_profile

[grid@storage Desktop]$ lsnrctl status

bash: lsnrctl: command not found

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

[grid@storage Desktop]$

Screenshot-grid@storage:~-Desktop.png

ORASCN

Hi ,

Is your Oracle Home and Oracle Base are correct?

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME

Which one is the correct one?

Regards,

Veera

Pavan Kumar

Better you try it some source file instead of bash for time being whether issue with paths /command or bash execution

[root@host1 Desktop]# ## fresh session

[root@host1 Desktop]# su - oracle

Last login: Sun Dec 27 14:20:55 IST 2015 on pts/2

[oracle@host1 ~]$ cat demo1.sh


TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_SID=demo1; export ORACLE_SID
ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME

PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

alias oh="cd $ORACLE_HOME"
alias ob="cd $ORACLE_BASE"
alias sqls="sqlplus / as sysdba"
alias alertt="tail -f /u01/app/oracle/diag/rdbms/demo1/demo1/trace/alert_demo1.log"
alias alert="cd /u01/app/oracle/diag/rdbms/demo1/demo1/trace/"
alias tns="cd $ORACLE_HOME/network/admin"

[oracle@host1 ~]$ ## Your source of settings

[oracle@host1 ~]$ export ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
[oracle@host1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME
[oracle@host1 ~]$ export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH
[oracle@host1 ~]$ which sqlplus
/u01/app/oracle/product/12.1.0/dbhome_1/bin/sqlplus

[oracle@host1 ~]$ PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
[oracle@host1 ~]$ export PATH
[oracle@host1 ~]$ which sqlplus
/u01/app/oracle/product/12.1.0/dbhome_1/bin/sqlplus

works fine for me

- Pavan Kumar N

Ujjwal Rana

I have installed oracle with grid therefore both of them are correct

[grid@storage Desktop]$ echo $ORACLE_BASE

/u01/app/grid

[grid@storage Desktop]$  echo $ORACLE_HOME

/u01/app/11.2.0/grid

[grid@storage Desktop]$

Ujjwal Rana

Hi Pavan,

As per your instruction this is what i did

[grid@storage Desktop]$  su - root

Password:

[root@storage ~]#  fresh session

-bash: fresh: command not found

[root@storage ~]# fresh session

-bash: fresh: command not found

[root@storage ~]# #fresh session

[root@storage ~]# su - oracle

[oracle@storage ~]$ cat demo1.sh

cat: demo1.sh: No such file or directory

[oracle@storage ~]$ vi demo1.sh

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_SID=demo1; export ORACLE_SID

ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

alias oh="cd $ORACLE_HOME"

alias ob="cd $ORACLE_BASE"

alias sqls="sqlplus / as sysdba"

alias alertt="tail -f /u01/app/oracle/diag/rdbms/demo1/demo1/trace/alert_demo1.log"

alias alert="cd /u01/app/oracle/diag/rdbms/demo1/demo1/trace/"

alias tns="cd $ORACLE_HOME/network/admin"

========================

[oracle@storage ~]$ export ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

[oracle@storage ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME

[oracle@storage ~]$ export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH; export PATH

[oracle@storage ~]$ which sqlplus

/u01/app/oracle/product/11.2.0/db_1/bin/sqlplus

[oracle@storage ~]$ PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

[oracle@storage ~]$ export PATH

[oracle@storage ~]$ which sqlplus

/u01/app/oracle/product/11.2.0/db_1/bin/sqlplus

[oracle@storage ~]$

[oracle@storage ~]$ sqlplus / as sysdba

Error 6 initializing SQL*Plus

SP2-0667: Message file sp1<lang>.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

[oracle@storage ~]$

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

[grid@storage Desktop]$

NOT WORKING

Aman....

Ujjwal Rana wrote:

Hello Everyone,

While typing any of the below mentioned command I received command not found. I wonder what could be the reason. I have installed ORACLE GRID on my test server. Also Please feel free to check bash_profile output for grid from below :-

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

[grid@storage Desktop]$ asmca

bash: asmca: command not found

[grid@storage Desktop]$ lsnrctl status

bash: lsnrctl: command not found

[grid@storage Desktop]$

[grid@storage Desktop]$ vi ~/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=+ASM; export ORACLE_SID

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/common/oracle/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

Also you might need to check ORACLE USER .bash_profile OUTPUT as well. Below is an OUTPUT

[oracle@storage ~]$  vi ~/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=orcl; export ORACLE_SID

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/common/oracle/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

The Path needs to point to the BIN folder of the Oracle Home(GI Home) to launch the ASMCA. Follow the changes suggeseted by Pavan else, edit your /etc/oratab file and enter there the details of your SID along with the Oracle Home information. After doing so-use . oraenv(notice the dot ) and enter the SID . It should point you to the right Oracle Home.

HTH

Aman....

Pavan Kumar

I have just given basic stuff for you understanding...

Error 6 initializing SQL*Plus

SP2-0667: Message file sp1<lang>.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

With out below stuff

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

your message will not get opened

demo1.sh file is at my end, how can you expect at your end ...

- Pavan Kumar N

Ujjwal Rana

Right now this is what availalbe insidde /etc/oratab

[root@storage ~]#  cat /etc/oratab

#Backup file is  /u01/app/11.2.0/grid/srvm/admin/oratab.bak.storage line added by Agent

#

+ASM:/u01/app/11.2.0/grid:N

orcl:/u01/app/oracle/product/11.2.0/db_1:N        # line added by Agent

Ujjwal Rana

Sorry my bad. I thought to create a dummy like what you have provided.

Aman....

Ujjwal Rana wrote:

Right now this is what availalbe insidde /etc/oratab

[root@storage ~]#  cat /etc/oratab

#Backup file is  /u01/app/11.2.0/grid/srvm/admin/oratab.bak.storage line added by Agent

#

+ASM:/u01/app/11.2.0/grid:N

orcl:/u01/app/oracle/product/11.2.0/db_1:N        # line added by Agent

Since you want to use ASMCA, so enter when asked while executing .oraenv , +ASM. Show us the output here.

Aman....

Pavan Kumar

Hi,

My oratab

+ASM1:/u01/app/11.2.0/grid:N  # line added by Agent

racdb:/u03/app/11.2.0/db_home:N  # line added by Agent

My grid.env script

[oracle@rac1 ~]$ cat grid.env


TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH

PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$LD_LIBRARY_PATH:$PATH; export PATH

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib


If the above works you can use it.

- Pavan Kumar N

Aman....

The file is needed if you don't want to enter the SID information every time when you log-in .I haven't have added anything in my profile file. Here is what  I have in my ORATAB file.

--REM contents of ORATAB

orcl:/u01/app/oracle/product/12.1.0.2/dbhome_1:N

orcldb:/u01/app/oracle/product/12.1.0.2/dbhome_1:

[oracle@test12 ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

    . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

[oracle@test12 ~]$ . oraenv

ORACLE_SID = [orcl] ? nosid

ORACLE_HOME = [/home/oracle] ?

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID oracle.

You can set ORACLE_BASE manually if it is required.

Resetting ORACLE_BASE to its previous value or ORACLE_HOME

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@test12 ~]$ sqlplus

bash: sqlplus: command not found

[oracle@test12 ~]$ . oraenv

ORACLE_SID = [nosid] ? orcldb

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@test12 ~]$ which sqlplus

/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/sqlplus

[oracle@test12 ~]$

As I mentioned before, show us the output after putting +ASM in the . oraenv.

HTH

Aman....

Ujjwal Rana

You might want to see this

[oracle@storage ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Dec 27 15:23:43 2015

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

Connected to an idle instance.

SQL>

Ujjwal Rana

[grid@storage Desktop]$ . oraenv

ORACLE_SID = [+ASM] ? +ASM

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID grid.

You can set ORACLE_BASE manually if it is required.

[grid@storage Desktop]$

AND THIS ONE TOO :-

[grid@storage Desktop]$ source ~/.bash_profile

[grid@storage Desktop]$ echo $ORACLE_BASE

/u01/app/grid

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

[grid@storage Desktop]$

Aman....

Ujjwal Rana wrote:

[grid@storage Desktop]$ . oraenv

ORACLE_SID = [+ASM] ? +ASM

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID grid.

You can set ORACLE_BASE manually if it is required.

[grid@storage Desktop]$

Did you do the installation using this user-GRID or the Oracle user ?

What happens when you manually set the parameters ORACLE_HOME and ORACLE_BASE?

Aman....

Aman....

Ujjwal Rana wrote:

You might want to see this

[oracle@storage ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Dec 27 15:23:43 2015

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

Connected to an idle instance.

SQL>

This tells nothing but only this that either you are trying to connect to a wrong SID or your DB is not yet started.

Aman....

Ujjwal Rana

This is what it happens

[grid@storage Desktop]$ vi ~/.bash_profile

[grid@storage Desktop]$ source ~/.bash_profile

[grid@storage Desktop]$ echo $ORACLE_BASE

/u01/app/grid

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

[grid@storage Desktop]$ asmca

bash: asmca: command not found

[grid@storage Desktop]$ asmcmd

bash: asmcmd: command not found

Aman....

I didn't ask you to do this. I asked -one, have you done the installation of ASM using GRID user and two , what happens when you manually set both the environment variables. We can't see what you are doing so please follow what you are suggested to do.

Aman....

Ujjwal Rana

yes i did the installation of ASM using GRID user. However i have paste the oraenv output for both grid and oracle user below. This time i have paste the output doing manually this time.

ok for grid as per your advise i did it manually here is the oraenv output

[grid@storage Desktop]$ . oraenv

ORACLE_SID = [+ASM] ? +ASM

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID grid.

You can set ORACLE_BASE manually if it is required.

[grid@storage Desktop]$ export ORACLE_BASE=/u01/app/grid

[grid@storage Desktop]$ echo $ORACLE_BASE

/u01/app/grid

[grid@storage Desktop]$

[grid@storage Desktop]$ sqlplus / as sysdba

bash: sqlplus: command not found

And for oracle user here is the oraenv output

[oracle@storage ~]$ . oraenv

ORACLE_SID = [orcl] ? orcl

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@storage ~]$

[oracle@storage ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Dec 27 15:57:26 2015

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

Connected to an idle instance.

SQL>

Ujjwal Rana

Hi Pavan,

I have past the oraenv output for grid and oracle user on the last comment. Please advise.

Aman....

Switch the user using su - grid. Then set both the environment variables ORACLE_BASE and ORACLE_HOME and show us the output. Do not  miss the dash(-) while switching to the GRID user.

Also , show the output of

ls -l $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml


Aman....

Ujjwal Rana

[oracle@storage ~]$ su - grid

Password:

[grid@storage ~]$ export ORACLE_BASE=/u01/app/grid

[grid@storage ~]$ export ORACLE_HOME=/u01/app/11.2.0/grid

[grid@storage ~]$ ls -l $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

ls: cannot access /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml: Permission denied

[grid@storage ~]$

Pavan Kumar

Hi,

Does your asm is up and running ? ps -ef | grep pmon

Check what Aman posted, a big doubt whether have you done installation correctly or not

- Pavan Kumar N

Ujjwal Rana

It was working perfectly before.

[grid@storage ~]$ ps -ef | grep pmon

grid      6241  6058  0 16:12 pts/1    00:00:00 grep pmon

[grid@storage ~]$

Aman....

Ujjwal Rana wrote:

[oracle@storage ~]$ su - grid

Password:

[grid@storage ~]$ ls -l $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

ls: cannot access /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml: Permission denied

[grid@storage ~]$

So you have messed up something somewhere. If as you said, the installation is correctly done as GRID user, it should had the permission to do the listing of the file.

Execute the following commands,

#chmod 666 $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

#chmod 775 /u01/app/11.2.0/grid/inventory/ContentsXML/

And show us that you have the ASM instance running  using,

ps -ef| grep pmon

Aman....

Aman....

Ujjwal Rana wrote:

It was working perfectly before.

[grid@storage ~]$ ps -ef | grep pmon

grid      6241  6058  0 16:12 pts/1    00:00:00 grep pmon

[grid@storage ~]$

Before when? You are not having proper permissions for the user GRID . I doubt that your ASM instance worked fine ever. Execute the commands that I mentioned in my last reply and re-execute the . oraenv and share the output here.

Aman....

Ujjwal Rana

[root@storage ~]# chmod 666 $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

chmod: cannot access `/inventory/ContentsXML/oraclehomeproperties.xml': No such file or directory

[root@storage ~]# chmod 775 /u01/app/11.2.0/grid/inventory/ContentsXML/

[root@storage ~]# ps -ef| grep pmon

root      6774  6703  0 16:21 pts/1    00:00:00 grep pmon

[root@storage ~]#

[grid@storage ~]$ ps -ef| grep pmon

grid      6880  6058  0 16:23 pts/1    00:00:00 grep pmon

[grid@storage ~]$

[oracle@storage ~]$ ps -ef| grep pmon

oracle    6954  6930  0 16:24 pts/1    00:00:00 grep pmon

[oracle@storage ~]$

BUT GETTING INSIDE THIS LOCATIONS oraclehomeproperties.xml FILE DOES EXIST here is an output

[root@storage ContentsXML]# pwd

/u01/app/11.2.0/grid/inventory/ContentsXML

[root@storage ContentsXML]#

[root@storage ContentsXML]# ls

comps.xml  config.xml  ConfigXML  libs.xml  oraclehomeproperties.xml

[root@storage ContentsXML]#

Aman....

You are not following what you are being told to do.

[root@storage ~]# chmod 666 $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

chmod: cannot access `/inventory/ContentsXML/oraclehomeproperties.xml': No such file or directory

The error is quite self-explanatory because ROOT doesn't have any ORACLE_HOME variable set. So you need to give the absolute PATH and if you have noticed, I had typed in the absolute path in my last reply.  Also show us the output of the LS command as asked before.

Aman....

Ujjwal Rana

[root@storage ContentsXML]# ls

comps.xml  config.xml  ConfigXML  libs.xml  oraclehomeproperties.xml

[root@storage ContentsXML]#

This one has already been executed

[root@storage ~]# chmod 775 /u01/app/11.2.0/grid/inventory/ContentsXML/


[root@storage ContentsXML]# chmod 666 /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

[root@storage ContentsXML]#

[root@storage ContentsXML]# ls -l /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

-rw-rw-rw- 1 grid oinstall 535 Jul 16 23:59 /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

[root@storage ContentsXML]#

[root@storage ContentsXML]# ps -ef| grep pmon

root      7706  7218  0 16:38 pts/1    00:00:00 grep pmon

[root@storage ContentsXML]# su - grid

[grid@storage ~]$ ps -ef| grep pmon

grid      7748  7716  0 16:38 pts/1    00:00:00 grep pmon

[grid@storage ~]$

Aman....

Ujjwal Rana wrote:

[root@storage ContentsXML]# chmod 666 /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

[root@storage ContentsXML]#

[root@storage ContentsXML]# ls -l /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

-rw-rw-rw- 1 grid oinstall 535 Jul 16 23:59 /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

[root@storage ContentsXML]#

Connect as GRID user and attempt to do the LS over the file.

Aman....

Ujjwal Rana

[grid@storage ~]$ ls -l /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

ls: cannot access /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml: Permission denied

[grid@storage ~]$

Aman....

Ujjwal Rana wrote:

[grid@storage ~]$ ls -l /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml

ls: cannot access /u01/app/11.2.0/grid/inventory/ContentsXML/oraclehomeproperties.xml: Permission denied

[grid@storage ~]$

As ROOT user, run the ORAINST.sh and ROOT.sh (from Grid Infrastructure's home)  and paste here the output of both the executions . Do ensure that the ROOT.sh must run from the GRID Infra's home.

Aman....

Ujjwal Rana

FROM ROOT

[root@storage oraInventory]# pwd

/u01/app/oraInventory

[root@storage oraInventory]# ls

backup  ContentsXML  install.platform  logs  oraInstaller.properties  oraInst.loc  orainstRoot.sh  oui

[root@storage oraInventory]# ./orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@storage oraInventory]#

FROM GRID (orainstroot.sh is not running from grid. Below is what it shows while running from grid)

[grid@storage oraInventory]$ locate / orainst | grep "orainst"

/u01/app/oraInventory/orainstRoot.sh

[grid@storage oraInventory]$ pwd

/u01/app/oraInventory

[grid@storage oraInventory]$ ls

backup  ContentsXML  install.platform  logs  oraInstaller.properties  oraInst.loc  orainstRoot.sh  oui

[grid@storage oraInventory]$ ./orainstRoot.sh

This script must be executed as root

[grid@storage oraInventory]$

Aman....

Are you able to list the file as GRID user and what's the output of . oraenv now?

Aman....

Ujjwal Rana

[grid@storage oraInventory]$ . oraenv

ORACLE_SID = [+ASM] ? +ASM

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID grid.

You can set ORACLE_BASE manually if it is required.

[grid@storage oraInventory]$

Aman....

Run ROOT.sh from the ROOT user and paste here the output. If you get the error that it's already been run, execute the following command  and show the output.

#/u01/app/11.2.0/grid/crs/install/rootcrs.pl -delete -force

Aman....

Ujjwal Rana

SHOULD BE DE-CONFIG OR DE-INSTALL ???

[root@storage ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -delete -force

Unknown option: delete

Usage:

      rootcrs.pl [-verbose] [-upgrade [-force] | -patch]

                 [-paramfile <parameter-file>]

                 [-deconfig [-deinstall] [-keepdg] | -downgrade] [-force] [-lastnode]

                 [-downgrade] [-oldcrshome <old crshome path>] [-version <old crs version>] 

                 [-unlock [-crshome <path to crs home>] [-nocrsstop]]

Aman....

Deconfig, apologies .

Aman....

Ujjwal Rana

[root@storage ~]#  /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Usage: srvctl <command> <object> [<options>]

    commands: enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config|upgrade

    objects: database|service|asm|diskgroup|listener|home|ons

For detailed help on each command and object and its options use:

  srvctl <command> -h or

  srvctl <command> <object> -h

PRKO-2012 : nodeapps object is not supported in Oracle Restart

CRS-4013: This command is not supported in a single-node configuration.

CRS-4000: Command Stop failed, or completed with errors.

################################################################

# You must kill processes or reboot the system to properly #

# cleanup the processes started by Oracle clusterware          #

################################################################

error: package cvuqdisk is not installed

Successfully deconfigured Oracle clusterware stack on this node

[root@storage ~]#

Aman....

Okay, so now run the ROOT.sh, ORAINST.sh and post here the outputs of both.

Aman....

Ujjwal Rana

[root@storage oraInventory]# pwd

/u01/app/oraInventory

[root@storage oraInventory]# ./orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@storage oraInventory]#

FROM GRID

[grid@storage oraInventory]$ pwd

/u01/app/oraInventory

[grid@storage oraInventory]$ ls

backup       install.platform  oraInstaller.properties  orainstRoot.sh

ContentsXML  logs              oraInst.loc              oui

[grid@storage oraInventory]$

[grid@storage oraInventory]$ ./orainstRoot.sh

This script must be executed as root

[grid@storage oraInventory]$


Aman....

I have repeatedly asked you to execute ROOT.sh and you have just not bothered about it. Where is the output of executing ROOT.sh ?

Aman....

Ujjwal Rana

My applogies

[root@storage grid]# pwd

/u01/app/11.2.0/grid

[root@storage grid]# ./root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

bash: /u01/app/11.2.0/grid/bin/ocrconfig: Permission denied

Failed to create or upgrade OLR

Failed to write the checkpoint:'ROOTCRS_OLR' with status:FAIL.Error code is 32256

Failed to write the checkpoint:'' with status:FAIL.Error code is 32256

Failed to create or upgrade OLR at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 7436.

/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl execution failed

[root@storage grid]#

[root@storage oraInventory]# ./orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@storage oraInventory]#

Aman....

bash: /u01/app/11.2.0/grid/bin/ocrconfig: Permission denied

According to this output, you don't have the proper permissions on the folder. How could you have the ASM running in the past if the script ever ran successfully?

Show us the permissions and ownership over this folder.

Aman....

Ujjwal Rana

I agree please allow me some time. I will come back to you tomorrow with ASM setup

[root@storage dev]# ls -la /dev/sd*

brw-rw---- 1 root disk   8,  0 Dec 27 18:22 /dev/sda

brw-rw---- 1 root disk   8,  1 Dec 27 18:22 /dev/sda1

brw-rw---- 1 root disk   8, 10 Dec 27 18:22 /dev/sda10

brw-rw---- 1 root disk   8, 11 Dec 27 18:22 /dev/sda11

brw-rw---- 1 root disk   8, 12 Dec 27 18:22 /dev/sda12

brw-rw---- 1 root disk   8, 13 Dec 27 18:22 /dev/sda13

brw-rw---- 1 root disk   8, 14 Dec 27 18:22 /dev/sda14

brw-rw---- 1 root disk   8, 15 Dec 27 18:22 /dev/sda15

brw-rw---- 1 root disk 259,  0 Dec 27 18:22 /dev/sda16

brw-rw---- 1 root disk 259,  1 Dec 27 18:22 /dev/sda17

brw-rw---- 1 root disk   8,  2 Dec 27 18:22 /dev/sda2

brw-rw---- 1 root disk   8,  3 Dec 27 18:22 /dev/sda3

brw-rw---- 1 root disk   8,  4 Dec 27 18:22 /dev/sda4

brw-rw---- 1 root disk   8,  5 Dec 27 18:22 /dev/sda5

brw-rw---- 1 root disk   8,  6 Dec 27 18:22 /dev/sda6

brw-rw---- 1 root disk   8,  7 Dec 27 18:22 /dev/sda7

brw-rw---- 1 root disk   8,  8 Dec 27 18:22 /dev/sda8

brw-rw---- 1 root disk   8,  9 Dec 27 18:22 /dev/sda9

Aman....

Ujjwal Rana wrote:

I agree please allow me some time. I will come back to you tomorrow with ASM setup

[root@storage dev]# ls -la /dev/sd*

brw-rw---- 1 root disk   8,  0 Dec 27 18:22 /dev/sda

brw-rw---- 1 root disk   8,  1 Dec 27 18:22 /dev/sda1

brw-rw---- 1 root disk   8, 10 Dec 27 18:22 /dev/sda10

brw-rw---- 1 root disk   8, 11 Dec 27 18:22 /dev/sda11

brw-rw---- 1 root disk   8, 12 Dec 27 18:22 /dev/sda12

brw-rw---- 1 root disk   8, 13 Dec 27 18:22 /dev/sda13

brw-rw---- 1 root disk   8, 14 Dec 27 18:22 /dev/sda14

brw-rw---- 1 root disk   8, 15 Dec 27 18:22 /dev/sda15

brw-rw---- 1 root disk 259,  0 Dec 27 18:22 /dev/sda16

brw-rw---- 1 root disk 259,  1 Dec 27 18:22 /dev/sda17

brw-rw---- 1 root disk   8,  2 Dec 27 18:22 /dev/sda2

brw-rw---- 1 root disk   8,  3 Dec 27 18:22 /dev/sda3

brw-rw---- 1 root disk   8,  4 Dec 27 18:22 /dev/sda4

brw-rw---- 1 root disk   8,  5 Dec 27 18:22 /dev/sda5

brw-rw---- 1 root disk   8,  6 Dec 27 18:22 /dev/sda6

brw-rw---- 1 root disk   8,  7 Dec 27 18:22 /dev/sda7

brw-rw---- 1 root disk   8,  8 Dec 27 18:22 /dev/sda8

brw-rw---- 1 root disk   8,  9 Dec 27 18:22 /dev/sda9

I didn't ask you to show  the permissions over the device files but over the following folder,

/u01/app/11.2.0/grid

The device files must be accessible to the GRID user. Which document you are following to create these ASM devices? Share with us the website/document.

Aman....

Ujjwal Rana

Actually I wanted to show you the disk quota permission for ASM and FRA as well and that's why I paste the above one. Here is the output

[grid@storage 11.2.0]$ ls -l /u01/app/11.2.0/grid

ls: cannot open directory /u01/app/11.2.0/grid: Permission denied

[grid@storage 11.2.0]$

[grid@storage 11.2.0]$  ls -al

drwxr-x--- 66 root oinstall 4096 Jul 16 23:58 grid

Aman....

Ujjwal Rana wrote:

Actually I wanted to show you the disk quota permission for ASM and FRA as well and that's why I paste the above one. Here is the output

[grid@storage 11.2.0]$ ls -l /u01/app/11.2.0/grid

ls: cannot open directory /u01/app/11.2.0/grid: Permission denied

[grid@storage 11.2.0]$

[grid@storage 11.2.0]$  ls -al

drwxr-x--- 66 root oinstall 4096 Jul 16 23:58 grid

I didn't ask for this information but for the document/website that you are referring to for creating this ASM environment. You haven't shown us once that . Also, what we can deduce so far from the outputs that not even once,your ASM instance had run.

Anyways, you should be able to see that your folder's ownership is with the ROOT user. Change that to GRID user and rerun the ROOT.sh . Show us the complete output of all the commands.

Aman....

Ujjwal Rana

I did not follow any online website. I followed what i have been taught. We were given steps for that and I have a note for that. As per my note, this is what I have done. Before changing ownership I would like to show the steps that i have followed for ASM. I have mentioned below accordingly :-

First : From FDISK create 3 partition for ASM and 3 partition for FRA

2. Convert the newly created partition into raw partitions

ls  /dev/raws

fdisk -l

raw /dev/raw/raw1 /dev/sda7

raw /dev/raw/raw2 /dev/sda8

raw /dev/raw/raw3 /dev/sda9

raw /dev/raw/raw4 /dev/sda10

raw /dev/raw/raw5 /dev/sda11

raw /dev/raw/raw6 /dev/sda17

chown -R oracle:oinstall /dev/raw

chmod 770 /dev/raw

chmod 660 /dev/raw/raw*

WRITE THIS INSIDE rc.local

vi /etc/rc.d/rc.local

raw /dev/raw/raw1 /dev/sda7

raw /dev/raw/raw2 /dev/sda8

raw /dev/raw/raw3 /dev/sda9

raw /dev/raw/raw4 /dev/sda10

raw /dev/raw/raw5 /dev/sda11

raw /dev/raw/raw6 /dev/sda17

chown -R oracle:oinstall /dev/raw

chmod 770 /dev/raw

chmod 660 /dev/raw/raw*

[root@storage ~]# ls -l /dev/raw

total 0

crw-rw---- 1 oracle oinstall 162, 1 Dec 28 10:22 raw1

crw-rw---- 1 oracle oinstall 162, 2 Dec 28 10:22 raw2

crw-rw---- 1 oracle oinstall 162, 3 Dec 28 10:22 raw3

crw-rw---- 1 oracle oinstall 162, 4 Dec 28 10:22 raw4

crw-rw---- 1 oracle oinstall 162, 5 Dec 28 10:22 raw5

crw-rw---- 1 oracle oinstall 162, 6 Dec 28 10:22 raw6

crw-rw---- 1 oracle oinstall 162, 0 Dec 28 10:22 rawctl

LOGOUT FROM ROOT and LOGIN AS GRID USER

1. Go to grid installed software directory.

2. ./runInstaller

3. Skip Software Updates

4. Choose Configure Oracle Grid Infrastructure for STANDALONE SERVER

5. NEXT

6. NEXT

7. REDUNDANCY --  SELECT NORMAL

click/select check box for ASM DISK QUOTA ( NOTE: Select three disk for ASM)

8. NEXT

9. ASM PASSWORD -- (use same password for the account).

10. NEXT

11. OPERATION SYSTEMS GROUP

Oracle ASMDBA=asmdba

Oracle ASM OPERATOR=asmoper

Oracle ASM ADMINISTRATOR=asmadmin

12. NEXT

13. YES

14. NEXT

15. Create Inventory

16. Next

Can you add me in your friend list there is one more thing which I would like to share with you. I wanted to send it through message.

1 - 50 Next
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 5 2016
Added on Dec 27 2015
95 comments
26,264 views