Tuesday, July 21, 2015

ASMSNMP user in ASM 11g (user creation/password change)


Could not validate ASMSNMP password due to following error- “ORA-01031: insufficient privileges”
ORA-01990: error opening password file ‘/u02/app/11.2.0/grid/dbs/orapw’
ORA-15306: ASM password file update failed on at least one node
ORA-01918: user ‘ASMSNMP’ does not exist

Solutions:
Mostly the reason is missing asmsnmp user or missing password file in ASM instances.
Node1:
#su – grid
$. Oraenv
[ORACLE_SID]+ASM1
$sqlplus ‘/as sysasm’
 SQL> select * from v$pwfile_users;
no rows selected
 or
Node1 :
#su  - grid
$. Oraenv    +ASM1
$asmcmd
ASMCMD> lspwusr
Username sysdba sysoper sysasm
 This shows no user are present it means ASM password file is missing.  We have to recreate the password file.
Node1:
#su - grid
$. oraenv   +ASM1
$ cd $ORACLE_HOME/dbs
$ls -lrt
check whether orapw+ASM file exist or not . If not recreate it
$orapwd file=/u01/app/11.2.0.4/grid/dbs/orapw+ASM password=oracle force=y
copy the same file to rest all nodes .
$ scp orapw+ASM <Node2>:/u01/app/11.2.0.4/grid/dbs/
copy the password files to other nodes if you have more than 2 nodes in the RAC.
Now chek
#su - grid
$. oraenv  +ASM1
$sqlplus '/as sysasm'
SQL>select * from v$pwfile_users;
USERNAME              SYSDB                SYSOP             SYSAS
——————————————————————————————————————— —– —– —————————————————————————————————————–
SYS                    TRUE                TRUE                 TRUE
ASMSNMP                TRUE                FALSE                FALSE
 if still ASMSNMP user not exist, you create user under ASM instance
SQL>
create user and give sysdba privileges
SQL>create user asmsnmp identified by <make_asmsnmp_password>;
SQL> grant sysdba to asmsnmp;
SQL> show parameter pass
NAME                                   TYPE                            VALUE
———————————— —————————————————————————————– ——————————————————————————————————
remote_login_passwordfile             string                          EXCLUSIVE

The ASM instance parameter “REMOTE_LOGIN_PASSWORDFILE” has to be set to EXCLUSIVE or you will get an ORA-01999 error.
Also you can check  user detials from asmcmd
ASMCMD> lspwusr
Username        sysdba         sysoper       sysasm
SYS             TRUE           TRUE          FALSE
ASMSNMP         TRUE           FALSE         FALSE
 How to Change password for ASMSNMP
——————————————————–
ASMCMD> lspwusr
Username  sysdba sysoper sysasm
SYS       TRUE   TRUE     TRUE
ASMSNMP   TRUE   FALSE    FALSE
ASMCMD> orapwusr --modify --password ASMSNMP
Enter password: *******
(give new password and press enter)
orapwusr attempts to update passwords on all nodes in a cluster. The command requires the SYSASM privilege to run. A user logged in as SYSDBA cannot change its password using this command.

Test new asmsnmp password >>
————————–
$ sqlplus asmsnmp/asmsnmp as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 6 12:57:30 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Real Application Clusters and Automatic Storage Management options

Note:  You can visit for RAC/ASM/PT/RMAN/Golden gate classes in www.amktechs.com





2 comments:

  1. Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject.
    jiofi 2 settings

    ReplyDelete

Share your knowledge it really improves, don't show off...