ITPub博客

首页 > 应用开发 > IT综合 > 通过asmcmd进入asm实例时可能会遇到的一些问题

通过asmcmd进入asm实例时可能会遇到的一些问题

原创 IT综合 作者:warehouse 时间:2011-01-26 18:37:58 0 删除 编辑

使用asmcmd时可能会遇到的一些问题,总结一下

[@more@]

C:>asmcmd
"asmcmd: the environment variable ORACLE_HOME is not set."

C:>set ORACLE_HOME='G:oracleproduct10.2.0db_1'
--进入asmcmd事先需要设置ORACLE_HOME环境变量一直是我所不能理解的,oracle为什么
要这么做,本来注册表里已经有了对ORACLE_HOME的设置,今天在讲课的时候一位学员
在设置ORACLE_HOME之后进入asmcmd时遇到了下面的错误:
C:>asmcmd
'perl.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
--仔细对比之后发现最后是由于在G:oracleproduct10.2.0db_1外面加了单引号
C:>set ORACLE_HOME=G:oracleproduct10.2.0db_1

C:>asmcmd
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist (DBD ERROR: OCISessionBegin)
C:>set oracle_sid=+asm

C:>asmcmd
ASMCMD> exit
--================================
通过修改sqlnet.ora里面的SQLNET.AUTHENTICATION_SERVICES= (none)屏蔽os认证
之后asmcmd进入时错误如下,最后通过asmcmd的help我们发现原来asmcmd其实隐含着登录
+asm的操作,需要os认证必须打开才能进入asmcmd。
--================================
C:>asmcmd
ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin)
C:>asmcmd
ASMCMD> help
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>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/19602/viewspace-1045214/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-07

  • 博文量
    717
  • 访问量
    5366312