Chinaunix首页 | 论坛 | 博客
  • 博客访问: 75510
  • 博文数量: 12
  • 博客积分: 326
  • 博客等级: 一等列兵
  • 技术积分: 147
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-18 17:00
文章分类

全部博文(12)

文章存档

2012年(12)

我的朋友

分类: Oracle

2012-12-19 12:00:37

在 SQLplus 命令提示符下 让按上下键就可以跳回前面执行过的命令

下载 rlwrap :
我下载的是 rlwrap-0.37.tar.gz

# tar xzvf rlwrap-0.37.tar.gz

进入解压目录 rlwrap-0.37
#./configure
#make
#make install

如果在执行configure时失败( make 不通过),就看一下失败提示。一般是需要安装一些依赖包,到 centos6.3 的第一张光盘里的Packages目录下找需要的包并安装。下面是我安装需要的包:

[root@localhost Packages]# rpm -ivh readline-6.0-4.el6.x86_64.rpm
warning: readline-6.0-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
    package readline-6.0-4.el6.x86_64 is already installed
[root@localhost Packages]# rpm -ivh ncurses-5.7-3.20090208.el6.x86_64.rpm
warning: ncurses-5.7-3.20090208.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
    package ncurses-5.7-3.20090208.el6.x86_64 is already installed

[root@localhost Packages]# rpm -ivh ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
warning: ncurses-devel-5.7-3.20090208.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:ncurses-devel          ########################################### [100%]
[root@localhost Packages]# rpm -ivh readline-devel-6.0-4.el6.x86_64.rpm warning: readline-devel-6.0-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:readline-devel         ########################################### [100%]
[root@localhost Packages]#

然后再到目录 rlwrap-0.37 下:
#./configure
#make
#make install

安装 rlwrap 成功! 赶快试试吧!

# rlwrap sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 19 11:57:55 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size            2213776 bytes
Variable Size          939526256 bytes
Database Buffers      654311424 bytes
Redo Buffers            7360512 bytes
SQL> select name from v$database;
select name from v$database
                 *
ERROR at line 1:
ORA-01507: database not mounted


SQL> startup immediate
SP2-0714: invalid combination of STARTUP options
SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL>

按上下键可以翻回前面执行的命令啦,哈哈。。。。。

阅读(1907) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~