Oracle Database- A.S.M

Oracle ASM Administration with Commands — Colorful Guide

⚡ Oracle ASM Administration with Commands 🌈

Oracle ASM (Automatic Storage Management) administration involves monitoring, managing, and optimizing ASM instances and disk groups. With ASM, DBAs can easily handle storage tasks while ensuring high availability and performance.

📂 Common ASM Administration Tasks

  • Managing disk groups (create, add, drop).
  • Monitoring ASM instances and processes.
  • Managing ASM users and privileges.
  • Performing backup and recovery operations.
  • Ensuring redundancy and performance optimization.

🛠️ Key ASM Commands

Start/Stop ASM Instance

  • srvctl start asm
  • srvctl stop asm

Check ASM Instance Status

  • srvctl status asm

Using ASMCMD Utility

  • List disk groups: asmcmd lsdg
  • List disks: asmcmd lsdsk
  • List directories: asmcmd ls
  • Check space usage: asmcmd du

SQL*Plus Administration

  • Connect to ASM: sqlplus / as sysasm
  • View disk groups: SELECT name, state, type FROM v$asm_diskgroup;
  • Add disk to group: ALTER DISKGROUP DATA ADD DISK '/dev/sdX';
  • Drop disk: ALTER DISKGROUP DATA DROP DISK disk_name;
  • Mount disk group: ALTER DISKGROUP DATA MOUNT;
  • Dismount disk group: ALTER DISKGROUP DATA DISMOUNT;

🔎 Monitoring ASM

  • View ASM processes: ps -ef | grep asm
  • Check ASM alert logs: $GRID_HOME/diag/asm/+asm/<hostname>/alert.log
  • Disk group usage details: SELECT name, total_mb, free_mb FROM v$asm_diskgroup;

💡 Best Practices

  • Regularly monitor ASM space and performance.
  • Maintain separate disk groups for DATA and FRA.
  • Use appropriate redundancy based on business needs.
  • Automate ASM monitoring using scripts or OEM.
  • Test ASM recovery procedures periodically.

✨ Conclusion

Oracle ASM administration is vital for database performance and availability. By mastering ASM commands and following best practices, DBAs can ensure efficient storage management and smooth database operations.