在一次测试中,发现在oracle用户下无法使用@符号,测试用tnsnames登录的时候,无法识别@符号:
1 2 |
$ sqlplus user/pwd@hnadt sh: hnadt: not found. |
但是tnsping却能ping通的,检查tnsnames.ora文件也没问题,同时,用vi打开profile时,也不能添加使用@符号。这个问题应是环境变量引起的。
在.profile中加入以下内容即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
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 > " |