HP中无法使用@符号


在一次测试中,发现在oracle用户下无法使用@符号,测试用tnsnames登录的时候,无法识别@符号:

$ sqlplus user/pwd@hnadt
sh: hnadt:  not found.

但是tnsping却能ping通的,检查tnsnames.ora文件也没问题,同时,用vi打开profile时,也不能添加使用@符号。这个问题应是环境变量引起的。

在.profile中加入以下内容即可:

oracle@ha_dc01:/oracle > cat .profile
 
# @(#)B.11.11_LR       
 
# Default user .profile file (/usr/bin/sh initialization).
 
# Set up the terminal:
        if [ "$TERM" = "" ]
        then
                eval ` tset -s -Q -m ':?hp' `
        else
                eval ` tset -s -Q `
        fi
        stty erase "^H" kill "^U" intr "^C" eof "^D"
        stty hupcl ixon ixoff
        tabs
 
# Set up the search paths:
        PATH=$PATH:.
 
# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0
 
# Set up the shell variables:
        EDITOR=vi
        export EDITOR
 
# Oracle Environment
ORACLE_HOME=/oracle/app/oracle/product/9.2.0; export ORACLE_HOME
ORACLE_SID=hamisc; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
NLS_LANG=American_america.ZHS16GBK;export NLS_LANG
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
SHLIB_PATH=$ORACLE_HOME/lib32;export SHLIB_PATH
 
# Set shell search paths:
PATH=/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/local/bin:/oracle/OPatch:/opt/perl/bin:$ORACLE_HOME/bin
export PATH
 
OPATCH_PLATFORM_ID=59; export OPATCH_PLATFORM_ID
export PS1="$LOGNAME@`hostname`:\$PWD > "

· 【文章发布信息】发表于: 2008-09-01 @ 13:00:27 · ||分类: ..experience, Working case

留条评论