ASM技术基础(6)

六、ASMCMD命令行

1、进入ASMCMD

$asmcmd -p    /* -p: 提示符显示当前的目录 */

2、列出目录信息

ASMCMD [+] > ls
ASMCMD [+] > ls -al

3、别名

ASMCMD [+ASM_DISKGROUP/ORA10G/DATAFILE] > ls -al
Type             Redund         Striped         Time        Sys  Name
DATAFILE   MIRROR      COARSE   MAR 16 08:00:00  Y   none => SYSAUX.260.712716487
DATAFILE   MIRROR     COARSE   MAR 10 18:00:00  Y   none => SYSTEM.259.712716453
DATAFILE   MIRROR      COARSE   MAR 10 18:00:00  Y   none => USERS.261.712716503

ASMCMD>mkalias SYSAUX.260.712716487 SYSAUX.dbf
ASMCMD>mkalias SYSTEM.259.712716453 SYSTEM.dbf
ASMCMD>mkalias USERS.261.712716503 USER.dbf

ASMCMD [+ASM_DISKGROUP/ORA10G/DATAFILE] > ls -al
Type         Redund      Striped         Time        Sys  Name
DATAFILE MIRROR COARSE MAR16 08:00:00 YSYSAUX.dbf => SYSAUX.260.712716487
DATAFILE MIRROR COARSE MAR10 18:00:00 YSYSTEM.dbf => SYSTEM.259.712716453
DATAFILE MIRROR COARSE MAR10 18:00:00 Y USER.dbf=> USERS.261.712716503

4、查看空间

ASMCMD>du
ASMCMD> lsdg

5、显示ASM和数据库实例连接情况

ASMCMD>lsct
DB_Name   Status         Software_Version  Compatible_version  Instance_Name
ora10g    CONNECTED       10.2.0.4.0          10.2.0.3.0                        ora10g
ora10g    CONNECTED       10.2.0.4.0          10.2.0.3.0                        ora10g

6、当文件关闭时候,可以使用rm 删除ASM文件

ASMCMD>rm 文件名

7、查找文件

ASMCMD> find +dg1 undo*
Trackback

no comment untill now

Add your comment now

切换到手机版