Change ASM Instance SYS ASMSNMP User Password

Change ASM instance SYS ASMSNMP user password by using ASM command “passwd”. If ASM password file is stored and shared in ASM diskgroup, then SQL “alter user” can still be used to change ASM user password.

Here is the way to change ASM instance SYS/ASMSNMP user password in 12c.

$ asmcmd
ASMCMD> pwget --asm
+OCR_VOTE/orapwASM

ASMCMD> cd +OCR_VOTE
ASMCMD> ls -l orapwASM
Type     Redund Striped Time           Sys Name
PASSWORD UNPROT COARSE  AUG 08 17:00:00 N  orapwASM => +OCR_VOTE/ASM/PASSWORD/pwdasm.256.919359249

ASMCMD> cd +OCR_VOTE/ASM/PASSWORD
ASMCMD> ls -l
Type     Redund Striped Time            Sys Name
PASSWORD UNPROT COARSE  AUG 08 17:00:00 Y   pwdasm.256.919359249
ASMCMD>

To see users in password file:

ASMCMD> lspwusr
Username sysdba sysoper sysasm
 SYS     TRUE   TRUE    TRUE
 ASMSNMP TRUE   FALSE   FALSE

ASMCMD> lspwusr --suppressheader
 SYS     TRUE TRUE  TRUE
 ASMSNMP TRUE FALSE FALSE
ASMCMD>

Change user password:

ASMCMD> passwd
usage: passwd <user>
help: help passwd
ASMCMD> help passwd
passwd
 Changes the password of a user.

Synopsis
 passwd <user>

Description
 The option for the passwd command is described below.

user - Name of the user.

An error is raised if the user does not exist in the Oracle ASM
 password file. The user is first prompted for the current password,
 then the new password. The command requires the SYSASM privilege to run

Examples
 This example changes the password of the oracle2 user.

ASMCMD [+] > passwd oracle2
 Enter old password (optional):
 Enter new password: ******


ASMCMD> passwd sys
Enter old password (optional):
Enter new password: *********
ASMCMD>

We can still use “alter user ” to change sys and asmsnmp user password :

SQL> alter user sys identified by "XXXXXXXX";
alter user sys identified by "XXXXXXXX"
 *
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> connect / as sysasm
Connected.
SQL> alter user sys identified by "XXXXXXXX";

User altered.

ORA-15014: path ‘/dev/oracleasm/disks/ASM_FRA01’ is not in the discovery set

Setting asm_diskstring parameter helps creating a successful ASM diskgroup.

When tried to create diskgroup FRA, and got errors as below:

SQL> CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ASM_FRA01' NAME ASM_FRA01;
CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ASM_FRA01' NAME ASM_FRA01
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/oracleasm/disks/ASM_FRA01' matches no disks
ORA-15014: path '/dev/oracleasm/disks/ASM_FRA01' is not in the discovery set

Checked ASM disk already existed:

# oracleasm listdisks
...
...
ASM_FRA01
OCR_VOTE01
...
...

SQL> ! ls -ltr /dev/oracleasm/disks/ASM_FRA01
brw-rw---- 1 grid dba 253, 2 Sep 26 15:32 /dev/oracleasm/disks/ASM_FRA01

Checked parameter asm_diskstring empty:

SQL> show parameter string

NAME             TYPE      VALUE
---------------- --------- -----
asm_diskstring   string

Could not change parameter asm_diskstring=’/dev/oracleasm/disks/*’

SQL> alter system set asm_diskstring='/dev/oracleasm/disks/*';
 alter system set asm_diskstring='/dev/oracleasm/disks/*'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-15014: path 'ORCL:OCR_VOTE01' is not in the discovery set

Change parameter asm_diskstring=’/dev/oracleasm/disks/*’ in spfile only :

SQL> alter system set asm_diskstring='/dev/oracleasm/disks/*' scope=spfile;

System altered.

Stop and then start CRS again :

# /u01/app/12.1.0.2/grid/bin/crsctl stop crs
...
...
...
# /u01/app/12.1.0.2/grid/bin/crsctl start crs

Check current parameter asm_diskstring :

SQL> show parameter asm

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string
asm_diskstring string /dev/oracleasm/disks/*
asm_power_limit integer 10
asm_preferred_read_failure_groups string

Check disks path :

SQL> col PATH format a60

SQL>  select NAME,LABEL,PATH from v$asm_disk;

NAME LABEL PATH
------------------------------ ------------------------------- ------------------------------------------------------------
 /dev/oracleasm/disks/ASM_disk09
 /dev/oracleasm/disks/ASM_DISK05
 /dev/oracleasm/disks/ASM_DISK08
 /dev/oracleasm/disks/ASM_DISK01
 /dev/oracleasm/disks/ASM_DISK06
 /dev/oracleasm/disks/ASM_DISK07
 /dev/oracleasm/disks/ASM_FRA01
 /dev/oracleasm/disks/ASM_DISK04
 /dev/oracleasm/disks/ASM_DISK02
 /dev/oracleasm/disks/ASM_DISK03
OCR_VOTE01 /dev/oracleasm/disks/OCR_VOTE01

11 rows selected.

Now create diskgroup FRA successfully  :

SQL> CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ASM_FRA01' NAME ASM_FRA01;

Diskgroup created.

ORA-15031: disk specification ‘/dev/oracleasm/disks/ASM_FRA01’ matches no disks

When tried to create diskgroup FRA, and got the following errors:

SQL> CREATE DISKGROUP FRA EXTERNAL REDUNDANCY 
            DISK '/dev/oracleasm/disks/ASM_FRA01' NAME ASM_FRA01;
CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ASM_FRA01' NAME ASM_FRA01
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/oracleasm/disks/ASM_FRA01' matches no disks
ORA-15014: path '/dev/oracleasm/disks/ASM_FRA01' is not in the discovery set

Checked ASM disk already existed:

# oracleasm listdisks
...
...
ASM_FRA01
OCR_VOTE01
...
...

SQL> ! ls -ltr /dev/oracleasm/disks/ASM_FRA01
brw-rw---- 1 grid dba 253, 2 Sep 26 15:32 /dev/oracleasm/disks/ASM_FRA01

Subscribe to get access

Read more of this content when you subscribe today.

ASM rebalance ASM_POWER_LIMIT parameter

Parameter ASM_POWER_LIMIT will affect the speed of rebalancing disks, and the resources consumed.

If COMPATIBLE.ASM disk group attribute is set to 11.2.0.2 or higher, then asm_power_limit value range is 0 to 1024.

If COMPATIBLE.ASM disk group attribute is set to lower than 11.2.0.2 , then asm_power_limit value range will be 0 to 11.

We can change the rebalance power either at the ASM instance level or at the individual disk group level.

Changing  the value at the instance level, this will alter the power limit for any new operations, but not the existing ones.

SQL > alter system set asm_power_limit=5 scope=both;

Change the value at the disk group level, this will change an existing operation on the diskgroup involved in the current operation.

SQL> alter diskgroup diskgroup1 rebalance power 8;

The effect of the change can be viewed from v$asm_operation:

SQL> select * from gv$asm_operation;