ASM工具asmcmd
作者: 杨廷琨, 出处:blog, 责任编辑: 李书琴,
2008-09-08 10:36
Oracle的ASM一直不够透明,但Oracle还是提供了一些工具来访问ASM磁盘组的,asmcdm就是其中一个工具,本文将对其进行详细介绍。
感觉Oracle的ASM一直很不透明,不过Oracle还是提供了一些工具来访问ASM磁盘组的,asmcdm就是其中一个工具。
如果不做任何配置,直接调用asmcmd,多半会碰到下面的错误:
| $ asmcmd ASMCMD-08103: failed to connect to ASM; ASMCMD running in non-connected mode |
要连接ASM,其实只需要做两件事情,确保$ORACLE_HOME和$ORACLE_SID的设置正确既可:
| ASMCMD> exit $ bash bash-3.00$ env|grep ORACLE_ ORACLE_SID=rac11g1 ORACLE_BASE=/data/oracle ORACLE_HOME=/data/oracle/product/11.1/database bash-3.00$ export ORACLE_SID=+ASM1 bash-3.00$ asmcmd ASMCMD> ls DATA/ |
现在已经成功的连接到ASM磁盘组。
| ASMCMD> help asmcmd [-v] [-a ] [-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 -v option prints the asmcmd version number and exits immediately. Specify the -a option to choose the type of connection. There are only two possibilities: connecting as "sysasm" or as "sysdba". The default value if this option is unspecified is "sysasm". 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: -------- help cd cp du find
最新评论网友评论相关文章最新文章
邮件订阅该文章的读者还阅读了All Rights Reserved, Copyright 2004-2008, Ctocio.com.cn
渝ICP证B2-20030003号 如有意见请与我们联系 powered by 天极内容管理平台CMS4i |

