Linux系统中SQLPlus不能使用Backspace的解决办法
2016-10-18 13:12
489 查看
远程Linux/Unix系统进入sqlplus下输入sql语句后,按backspace键退格的时候会出现乱码^H,对于该问题可以通过其他方式来实现退格功能,也可以设置或者修改相应的参数来解决该问题,具体的方法如下:
方法一:
直接使用delete键来代替退格键;
方法二:
使用ctrl+backspace键来代替退格键;
方法三:
在运行sqlplus之前运行stty erase ^h
[oracle@qbpt bin]$ stty erase ^h
若要恢复Ctrl+Backspace组合键删除功能,可执行以下命令:
[oracle@qbpt bin]$ stty erase ^?
同时可通过stty -a查看所有的终端设置:
[oracle@qbpt bin]$ stty -a
speed 38400 baud; rows 57; columns 197; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -cdtrdsr
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
方法四:
在进入到sqlplus后,可以通过vi编辑器对相应的Sql语句进行修改,相应的命令为ed或者edit;
SQL> select user from dual;
USER
------------------------------
SCOTT
SQL> ed;
SQL> edit;
如果没有出现vi界面,只是出现类似于“Wrote file afiedt.buf 24”的内容,则需要输入q,然后按回车退到SQL>界面,然后执行define
_editor=vi命令修改编辑器为VI编辑器;
SQL> ed
Wrote file afiedt.buf
24
SQL> define _editor=vi
SQL> ed
方法五:
直接将配置写到配置文件profile中,具体的内容为:
stty erase ^h
PS1="\u@\h $ "
export EDITOR=vi
方法六:
如果使用CRT工具远程Linux系统时,可以通过修改配置来解决Backspace键不能正常退格的问题,在选项->会话选项->终端->映射键->其他键的对话框中勾选“Backspace发送delete”前的单选框,然后点击“确定”按钮保存即可。
方法一:
直接使用delete键来代替退格键;
方法二:
使用ctrl+backspace键来代替退格键;
方法三:
在运行sqlplus之前运行stty erase ^h
[oracle@qbpt bin]$ stty erase ^h
若要恢复Ctrl+Backspace组合键删除功能,可执行以下命令:
[oracle@qbpt bin]$ stty erase ^?
同时可通过stty -a查看所有的终端设置:
[oracle@qbpt bin]$ stty -a
speed 38400 baud; rows 57; columns 197; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -cdtrdsr
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
方法四:
在进入到sqlplus后,可以通过vi编辑器对相应的Sql语句进行修改,相应的命令为ed或者edit;
SQL> select user from dual;
USER
------------------------------
SCOTT
SQL> ed;
SQL> edit;
如果没有出现vi界面,只是出现类似于“Wrote file afiedt.buf 24”的内容,则需要输入q,然后按回车退到SQL>界面,然后执行define
_editor=vi命令修改编辑器为VI编辑器;
SQL> ed
Wrote file afiedt.buf
24
SQL> define _editor=vi
SQL> ed
方法五:
直接将配置写到配置文件profile中,具体的内容为:
stty erase ^h
PS1="\u@\h $ "
export EDITOR=vi
方法六:
如果使用CRT工具远程Linux系统时,可以通过修改配置来解决Backspace键不能正常退格的问题,在选项->会话选项->终端->映射键->其他键的对话框中勾选“Backspace发送delete”前的单选框,然后点击“确定”按钮保存即可。
相关文章推荐
- 解决 XMANAGER下SQLPLUS不能使用上下左右和BACKSPACE键问题
- 不能“在oracle db server上使用sqlplus / as sysdba”的解决办法
- sqlplus时不能用Backspace来删除字符的解决
- SecureCRT远程连接Linux下的sqlplus中退格键不能使用之解决方法
- 【Linux】编辑文件时,箭头按键还有BACKSPACE按键不能正常使用的解决办法
- 【Oracle】解决oracle sqlplus 中上下左右backspace不能用
- Oracle数据库之使用sqlplus执行sql脚本乱码解决办法
- linux环境sqlplus中使用backspace键出现乱码的解决
- Linux环境下的SQL*PLUS及RMAN中不能使用上下方向键查看命令历史的解决方法
- 解决oracle中sqlplus客户端命令行中出现^H字符以及不能使用历史命令行
- sqlplus时不能用Backspace来删除字符的解决
- xshell中在oracle的sqlplus中backspace键不能删除最后一个字符的解决
- SecureCRT远程连接Linux下的sqlplus中退格键不能使用之解决方法
- oracle11g安装完成在cmd命令行使用sqlplus登录时提示:ORA-12560: TNS: 协议适配器错误 的解决办法
- oracle11g安装完成在cmd命令行使用sqlplus登录时提示:ORA-12560: TNS: 协议适配器错误 的解决办法
- linux--解决oracle sqlplus 中上下左右backspace不能用
- (转)oracle11g安装完成在cmd命令行使用sqlplus登录时提示:ORA-12560: TNS: 协议适配器错误 的解决办法
- linux环境sqlplus中使用backspace键出现乱码的解决方法
- 在Linux的sqlplus中不能使用vi时的解决方法
- Linq2Sql数据实体外部更新时“不能添加其键已在使用中的实体”的解决办法