oracle asm capacity query

Oracle ASM is a scalable volume manager that provides flexibility and performance for storing data for Oracle databases. In order to ensure sufficient database capacity and system performance, it is important to always understand the usage of ASM storage capacity. This article will introduce you to how to query storage capacity in Oracle ASM.

First, you can query the total capacity of the ASM disk group using the v$asm_diskgroup view on the ASM instance. Here is an example:

SQL> SELECT name, total_mb
FROM v$asm_diskgroup;

This query will return the name of the ASM disk group along with the total capacity in MB.

If you want to query the usage capacity of an ASM disk group, you can use the following query:

SQL> SELECT name, total_mb, free_mb, required_mirror_free_mb, usable_file_mb
FROM v$asm_diskgroup;

This query will return the ASM disk group's name, total capacity, free capacity, required mirror space, and space available for files.

If you want to query ASM disk usage, you can use the following query:

SQL> SELECT name, path, total_mb, free_mb
FROM v$asm_disk;

This query will return the name, path, total capacity and available capacity of the ASM disk.

In addition to the above default SQL statements, you can also use the following command to query the ASM disk group capacity. Run the following command from the database's command line:

ASMCMD> lsdg

This command will return the ASM disk group's name, status, total capacity, free capacity, usage, and duplication attributes.

In addition to the lsdg command, you can also use the ASMCMD du command to query the usage capacity of the ASM disk group. Run the following command from the database's command line:

ASMCMD>du

This command will return the usage of the ASM disk group and its subdirectories.

To sum up, querying ASM capacity is one of the keys to ensuring the normal operation of database system performance. You can easily understand ASM storage capacity usage by using SQL and ASMCMD commands.

Guess you like

Origin blog.csdn.net/Ruishine/article/details/134882326