od a+x /usr/local/share/rlwrap/filters/* make[3]: Leaving directory `/opt/rlwrap-0.37' make[2]: Leaving directory `/opt/rlwrap-0.37' make[1]: Leaving directory `/opt/rlwrap-0.37' [root@rtest rlwrap-0.37]#
[root@rtest rlwrap-0.37]#
vi /home/oracle/.bash_profile # .bash_profile
# Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORACLE_SID=TEST0422 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export PATH=$ORACLE_HOME/bin:$PATH
PATH=$PATH:$HOME/bin
export PATH
stty erase ^H
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
~ ~ ~ "/home/oracle/.bash_profile" 25L, 455C written
保存退出,使文件立即生效。
[root@rtest rlwrap-0.37]# su - oracle
[oracle@rtest ~]$ . .bash_profile
3.使用rlwrap [oracle@rtest ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Tue May 6 10:31:02 2014
Copyright (c) 1982, 2005,
Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options
SYS@TEST0422>select * from scott.emp;
即现在就可以使用上下键来调用命令了。 #################################################################################################################
|