My Oracle Support Banner

ASMCMD Commands give ASMCMD-08102 for Non-DBA User (Doc ID 1537484.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

Symptoms

Environment:   Non-RAC -- 11202 -- Microsoft Windows x64 (64-bit) 2008 R2

Using a non-dba user login and asmcmd, fails to connect to a running ASM instance:

C:\Users\joedoe>set oracle_home=C:\Oracle\Grid11gR2
C:\Users\joedoe>SET ORACLE_SID=+ASM
C:\Users\joedoe>asmcmd
Connected to an idle instance.
ASMCMD> lsdg
ASMCMD-08102: no connection to ASM; command requires ASM to run

Checked that all Oracle Services are running under services.msc (among these are: OracleOHService, OracleASMService+ASM, and OracleOraCrs11g_home1TNSListener)

 

Further tracing, shows asmcmd fails with ORA-12560:

C:\Users\joedoe>set DBI_TRACE=1
C:\Users\joedoe>set oracle_home=C:\Oracle\Grid11gR2
C:\Users\joedoe>asmcmd
   DBI 1.602-ithread default trace level set to 0x0/1 (pid 7412) at DBI.pm line 273 via asmcmdshare.pm line 201
   -> DBI->connect(dbi:Oracle:, , ****, HASH(0x44ca968))
   -> DBI->install_driver(Oracle) for MSWin32 perl=5.010000 pid=7412 ruid=0 euid=0
      install_driver: DBD::Oracle version 1.20 loaded from C:/Oracle/Grid11gR2/perl/site/lib/DBD/Oracle.pm
            !! ERROR: '12560' 'ORA-12560: TNS:protocol adapter error (DBD ERROR: OCIServerAttach)' (err#0)
         DBI connect('','',...) failed: ORA-12560: TNS:protocol adapter error (DBDERROR: OCIServerAttach)
Connected to an idle instance.
ASMCMD>

 

 

Checked the listener is running and ASM is registered:

Note: Some data has been omitted as is specific for every system and is not necessary to explain the root of the problem

C:\Users\joedoe>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 07-MAR-2013 08:49:35
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
---------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
Start Date                22-FEB-2013 20:39:32
Uptime                    12 days 12 hr. 10 min. 4 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\Oracle\Grid11gR2\network\admin\listener.ora
Listener Log File         C:\Oracle\diag\tnslsnr\ATLAS\listener\alert\log.xml
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<omitted here>)(PORT=1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<omitted here>)(PORT=1521)))
Services Summary...
Service "+asm" has 1 instance(s).
 Instance "+asm", status READY, has 1 handler(s) for this service...
...
The command completed successfully

 

The errors are misleading, including the ORA-12560 (TNS:protocol adapter error).

The clue to the underlying problem is coming from the ORA-1031 (insufficient privileges) during sqlplus "/ as sysasm"

C:\> set oracle_home=C:\Oracle\Grid11gR2
C:\> SET ORACLE_SID=+ASM
C:\> echo %ORACLE_SID%
+ASM
C:\> echo %ORACLE_HOME%
C:\Oracle\Grid11gR2
C:\> sqlplus "/ as sysasm"
SQL*Plus: Release 11.2.0.2.0 Production on Wed Mar 13 12:03:09 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-01031: insufficient privileges 

Checked and "SQLNET.AUTHENTICATION_SERVICES = (NTS)" is already set in the server's sqlnet.ora file.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.