Thursday, August 22, 2013

sh: /u01/app/oracle/product/11.2.0/db_1/bin/clsecho: No such file or directory

Another annoying error but it's not a big issue.
[oracle@rac1 ~]$ asmcmd
Connected to an idle instance.
sh: /u01/app/oracle/product/11.2.0/db_1/bin/clsecho: No such file or directory
ASMCMD> ls
Can't exec "/u01/app/oracle/product/11.2.0/db_1/bin/clsecho": No such file or directory at /u01/app/oracle/product/11.2.0/db_1/lib/asmcmdshare.pm line 493, <STDIN> line 1.
Use of uninitialized value $buf in string ne at /u01/app/oracle/product/11.2.0/db_1/lib/asmcmdshare.pm line 497, <STDIN> line 1.
ASMCMD> 
The reason behind this is that the env for ASM is not setup properly. To set the proper env do the following
[oracle@rac1 ~]$ cat /etc/oratab | grep ASM
# a database or ASM Configuration Assistant while creating ASM instance.
+ASM1:/u01/app/11.2.0/grid:N          # line added by Agent
[oracle@rac1 ~]$ 

The very first thing we must do is check if the environment variables are correct.
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [RAC1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 ~]$ asmcmd
ASMCMD>
ASMCMD>
ASMCMD> ls
DATA/
ASMCMD> 

It is working for you, great!!!


2 comments:

Bernard said...

Thanks! :)

Anonymous said...

thanks,it works!