CTOCIO IT专家网

天极传媒 比特网 | 天极网 | IT专家网 | IT商网 | 52PK游戏网 | 手机天极 | IT分众 |
IT专家网搜索

数据库 | Oracle | DB2 | SQL Server | MySQL | 商业智能 | BI | DBA | Sybase| SQL Server 2008

您现在的位置: IT专家网 > 数据库子站 > 数据库技巧

ASM工具asmcmd

作者: 杨廷琨,  出处:blog, 责任编辑: 李书琴, 
2008-09-08 10:36
  Oracle的ASM一直不够透明,但Oracle还是提供了一些工具来访问ASM磁盘组的,asmcdm就是其中一个工具,本文将对其进行详细介绍。

  感觉OracleASM一直很不透明,不过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
共4页。 1 2 3 4 :
  • 本文关键词:

网友评论

笔名 
请您注意:遵守国家有关法律、法规,尊重网上道德,承担一切因您的行为而直接或间接引起的法律责任。    IT专家网友拥有管理笔名和留言的一切权利。
  • 周排行榜
  • 月排行榜

邮件订阅