000036041 - Oracle ASM Command Line (ASMCMD) does not work from Database Home in RSA Identity Governance & Lifecycle

Document created by RSA Customer Support Employee on Mar 3, 2018Last modified by RSA Customer Support Employee on Mar 5, 2018
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000036041
Applies ToRSA Product Set: Identity Governance & Lifecycle
RSA Product/Service Type: Appliance
RSA Version/Condition: 6.9 and above
 
IssueWhen attempting to use the Oracle ASM Command Line utility, the following error can occur.

ASMCMD error: Connected to an idle instance.
sh: /d01/cluster_oraclebin/product/11.2.0/dbhome_1/bin/clsecho: No such file or directory
Can't exec "/d01/cluster_oraclebin/product/11.2.0/dbhome_1/bin/clsecho": No such file or directory at /d01/cluster_oraclebin/product/11.2.0/dbhome_1/lib/asmcmdshare.pm line 493.
Use of uninitialized value $buf in string ne at /d01/cluster_oraclebin/product/11.2.0/dbhome_1/lib/asmcmdshare.pm line 497.

Alternately, the Oracle ASM Command Line utility may return no results.


# asmcmd
ASMCMD> ls
ASMCMD> lsdg
ASMCMD>
CausePrimarily, the cause is that the ORACLE_HOME and/or ORACLE_SID has not been set for the ASM Command line to function correctly.

However, for Oracle database version 11.2, there is also a required step before the ASM Command line can be used from the Database Home.  This is also a known Oracle bug, in that the clsecho file is not in the Database Home.

The following Oracle references are only available after logging into the Oracle Support portal.
  • Base Bug 17433996 - WIN2K8_11204_ASMUTL:PERL ERROR RETURN WHEN CD TO NO EXIST DIR WITH SYSDBA (fixed in Oracle database version 12.1)
  • Oracle Support Note 1665639.1 - ASMCMD does not work from Database Home.
ResolutionThe Oracle Support Note 1665639.1 - ASMCMD does not work from Database Home, advises that the option asmcmd --privilege sysdba is needed when running the ASM Command Line utility from a Database Home, as shown:

# asmcmd --privilege sysdba
ASMCMD> ls
DG01/
ASMCMD> lsdg
State      Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
CONNECTED  EXTERN  N         512   4096  1048576    963256   953541                0          953541              0             N  DG01/
ASMCMD>

Customers may also find that this is necessary when using an Oracle version 12.1 Database Home, as implemented on an RSA Identity Governance & Lifecycle Appliance version 7.0.0 and above.
WorkaroundAlternately, the following steps can be taken, so that the ASM Command Line utility works without having to specify the --privilege sysdba option.
  1. Login as the oracle user.
  2. Record the current settings for the ORACLE_HOME, ORACLE_SID and ORACLE_GRID_HOME.  Note that the values below are those from a normal RSA Identity Governance & Lifecycle implementation.


# echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0/db_1
# echo $ORACLE_SID
AVDB
# echo $ORACLE_GRID_HOME
/u01/app/12.1.0/grid


  1. Change the ORACLE_HOME and ORACLE_SID to suit the ASM Command Line utility.


# export ORACLE_SID=+ASM
# export ORACLE_HOME=/u01/app/12.1.0/grid


  1. The ASM Command Line utility can now run without the --privilege sysdba option:


# asmcmd
ASMCMD> ls
DG01/
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576    963256   953541                0          953541              0             N  DG01/
ASMCMD>


  1. To return the environment back to normal, the /home/oracle/setDeployEnv.sh script can be used or the ORACLE_HOME and ORACLE_SID can be returned to their original values.  Run one of the following options:


# . /home/oracle/setDeployEnv.sh


or



# export ORACLE_SID=AVDB
# export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1

Attachments

    Outcomes