ASMCMD工具的简单使用,功能有限.
[oracle@node1 ~]$ tail /etc/oratab
+ASM1:/u01/app/oracle/product/10.2.0/db_1:N
versid:/u01/app/oracle/product/10.2.0/db_1:N
[oracle@node1 ~]$ export ORACLE_SID=+ASM1
[oracle@node1 ~]$ asmcmd
ASMCMD>
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> lsct
#List all clients and their attributes from V$ASM_CLIENT
#lsct查看当前asm客户端
DB_Name Status Software_Version Compatible_version Instance_Name
versid CONNECTED 10.2.0.5.0 10.2.0.5.0 versid1
ASMCMD> lsdg
#List all diskgroups and their attributes from V$ASM_DISKGROUP
#lsdg查看当前磁盘组的状态
- State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
- MOUNTED EXTERN N N 512 4096 1048576 15259 13714 0 13714 0 DATA/
ASMCMD> du
#查看总容量多大
Used_MB Mirror_used_MB
1451 1451
阅读(2819) | 评论(0) | 转发(1) |