[oracle@rac1 oracle]$ export ORACLE_SID=+ASM1
[oracle@rac1 oracle]$ asmcmd
ASMCMD> help
asmcmd [-p] [command]
The environment variables ORACLE_HOME and ORACLE_SID determine the
instance to which the program connects, and ASMCMD establishes a
bequeath connection to it, in the same manner as a SQLPLUS / AS
SYSDBA. The user must be a member of the SYSDBA group.
Specifying the -p option allows the current directory to be displayed
in the command prompt, like so:
ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >
[command] specifies one of the following commands, along with its
parameters.
Type "help [command]" to get help on a specific ASMCMD command.
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD>
--------------------
V$ASM_TEMPLATE
V$ASM_ALIAS
V$ASM_FILE
V$ASM_CLIENT
V$ASM_DISKGROUP
V$ASM_DISKGROUP_STAT
V$ASM_DISK
V$ASM_DISK_STAT
V$ASM_OPERATION
alter diskgroup asm_disk1 add disk '/dev/raw/raw4';
col path for a15
col name for a15
select path,disk_number,state,mode_status,mount_status,name,total_mb-free_mb as used_mb from v$asm_disk;
select * from V$ASM_TEMPLATE;
col name for a30
col gno for 999
select name,
group_number as gno,
file_number as fno,
alias_index as a_ind,
parent_index as p_ind,
reference_index as ref_ind,
alias_directory as a_dir
from v$asm_alias;
col gno for 999
col fno for 999
col type for a12
select group_number as gno,
file_number as fno,
block_size as b_size,
blocks,bytes,space,
type,redundancy,striped
from v$asm_file;
select group_number,instance_name,db_name from v$asm_client;
col name for a10
col type for a6
select group_number,name,sector_size,state,type,total_mb-free_mb as used_mb,offline_disks from v$asm_diskgroup;
select group_number,name,state,type,total_mb-free_mb as used_mb from v$asm_diskgroup_stat;
select * from v$asm_operation;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23382569/viewspace-761086/
,如需转载,请注明出处,否则将追究法律责任。