技术活动
CUUG学员就业信息
学员感言、就业资讯
报名热线
文档
当前您的位置:首页 > 技术活动 > 技术中心 > 文档
理解ASM(五)ASM工具-CUUG

  [oracle@localhost ~]$ asmcmd help=y

  commands:

  --------

  cd

  du

  find

  help

  ls

  lsct

  lsdg

  mkalias

  mkdir

  pwd

  rm

  rmalias

  ① 列出目录信息

  ASMCMD> ls

  DATA/

  ASMCMD> ls -al

  State Type Rebal Unbal Name

  MOUNTED NORMAL N N DATA/

  ② 别名

  ASMCMD> ls -al

  Type Redund Striped Time Sys Name

  ONLINELOG MIRROR FINE NOV 04 19:00:00 Y none => group_4.256.798491239

  ASMCMD> mkalias group_4.256.798491239 redo_log_group_3.log

  ASMCMD> ls -al

  Type Redund Striped Time Sys Name

  ONLINELOG MIRROR FINE NOV 04 19:00:00 Y +DATA/ORCL/ONLINELOG/redo_log_group_3.log => group_4.256.798491239

  N redo_log_group_3.log => +DATA/ORCL/ONLINELOG/group_4.256.798491239

  ③ 查看空间

  ASMCMD> du

  Used_MB Mirror_used_MB

  89 179

  ASMCMD> lsdg

  State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name

  MOUNTED NORMAL N N 512 4096 1048576 701 358 101 128 0 DATA/

  ④ 查找文件

  ASMCMD> find +DATA redo*

  +DATA/ORCL/ONLINELOG/redo_log_group_3.log

  ⑤ 显示ASM和数据库实例的连接情况

  ASMCMD> lsct

  ⑥ 删除文件

  ASMCMD> rm +DATA/ORCL/ONLINELOG/redo_log_group_3.log