Oracle Common ASM Operations Commands

Source: Internet
Author: User

In an Oracle RAC environment, use a grid account to perform


Run asmcmd into ASM command mode, such as:



[Email protected] ~]$ Asmcmd


Asmcmd>



Asmcmd> du//displays all disk space occupied by ASM files in the specified ASM directory


Asmcmd> Ls-ls//Lists the contents of the ASM directory and their properties, disk space consumption


asmcmd> pwd//view current path


Asmcmd> CD. /data//Switch directory


Asmcmd> LSCT//listing information for the current ASM client


asmcmd> LSDG//List all disk groups and their properties


asmcmd> lsof//list data file information


asmcmd> lsdsk//List The information of the disk


asmcmd> rm-f *.dbf//delete all current extension. dbf files


asmcmd> rm-fr Orcldemo//delete current Orcldemo directory



The root path of the ASM disk is "+" instead of "/", and the following is the demo operation:


Asmcmd> CD Datadg/demo


asmcmd> pwd


+datadg/demo//current path is +DATADG/GD


Asmcmd> CD +//switch to ASM disk root path


asmcmd> pwd


+//current path is root path +



You can also operate without entering ASM command mode, such as:


[[email protected] ~]$ asmcmd ls-ls//view ASM disk usage



To use the graphical interface, you can use the ASM Assistant command: ASMCA


[Email protected] ~]$ Sqlplus/as sysasm



--View Disk group information


Sql> Select Name,state,type,total_mb, free_mb from V$asm_diskgroup;



--View disk information


Sql> select Group_number,path,state,total_mb,free_mb from V$asm_disk;



--View disk I/O information, DATADG to disk group name


[Email protected] ~]$ asmcmd lsdsk--statistics-g DATADG


or briefly read and write, including ASM disk list


[Email protected] ~]$ asmcmd iostat-g DATADG



Add ASM Disk Disk08_test to ASM Disk group DATADG, disk path is Orcl:data3_test


(You need to establish this disk name first at the operating system level/ETC/INIT.D/ORACLEASM Createdisk data3_test/dev/mapper/mpathx)


Sql> alter DiskGroup DATADG add disk ' orcl:data3_test ' name disk08_test;



Remove ASM disks from ASM Disk Group DATADG Disk08_test


sql> alter diskgroup DATADG drop disk disk08_test;



Oracle Common ASM Operations Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.