Thursday, October 14, 2010

New System Privilege 'SYSASM' to manage ASM instance in 11g

Hello All,

Today when I was trying to shutdown a 11g ASM instance connected as sysdba it was not allowing me to shutdown and gave 'ORA-01031: insufficient privileges'.

After a bit of research found that in 11g there is a new privilege called 'SYSASM' which is separate for ASM storage administration privilege and for maintaining ASM instance.The basic idea was to separate the storage administrator and the database administrator responsbilities.

Below is what I was trying to do.


[oracle@oelbox1 ~]$ echo $ORACLE_SID
+ASM

[oracle@oelbox1 ~]$ ps -ef | grep -i pmon
oracle 11810 1 0 18:58 ? 00:00:00 asm_pmon_+ASM
oracle 22821 22724 0 22:19 pts/5 00:00:00 grep -i pmon

[oracle@oelbox1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 14 22:19:07 2010
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Automatic Storage Management option

SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
+ASM

SQL> shutdown immediate
ORA-01031: insufficient privileges
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Pr oduction
With the Automatic Storage Management option

[oracle@oelbox1 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 14 22:19:46 2010
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> connect sys as sysasm
Enter password:
Connected.
SQL>
SQL> shut immediate
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Pr oduction With the Automatic Storage Management option