通過asmcmd進入asm例項時可能會遇到的一些問題

warehouse發表於2011-01-26

使用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部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-1045214/,如需轉載,請註明出處,否則將追究法律責任。

相關文章