openGauss和oracle的上下翻命令和自动补全

openGauss的gsql需要加参数"-r"才能支持上下翻命令和自动补全。

gsql -d postgres -p 15400 -r

oracle的sqlplus也不支持上下翻命令和自动补全。

使用rlwrap可以实现上下翻命令,但是还是不能实现自动补全功能。

1、安装rlwrap,使oracle支持上下翻滚

[root@node1 ~]# yum install -y rlwrap

Repository epel is listed more than once in the configuration

上次元数据过期检查:1:53:17 前,执行于 2023年08月23日 星期三 16时58分47秒。

依赖关系解决。

=====================================================================================================================================================================

软件包 架构 版本 仓库 大小

=====================================================================================================================================================================

安装:

rlwrap x86_64 0.46.1-1.el8 epel 139 k

安装依赖关系:

perl-File-Slurp noarch 9999.19-19.el8 AppStream 47 k

事务概要

=====================================================================================================================================================================

安装 2 软件包

总下载:185 k

安装大小:426 k

下载软件包:

(1/2): perl-File-Slurp-9999.19-19.el8.noarch.rpm 363 kB/s | 47 kB 00:00

(2/2): rlwrap-0.46.1-1.el8.x86_64.rpm 952 kB/s | 139 kB 00:00


总计 1.1 MB/s | 185 kB 00:00

运行事务检查

事务检查成功。

运行事务测试

事务测试成功。

运行事务

准备中 : 1/1

安装 : perl-File-Slurp-9999.19-19.el8.noarch 1/2

安装 : rlwrap-0.46.1-1.el8.x86_64 2/2

运行脚本: rlwrap-0.46.1-1.el8.x86_64 2/2

/sbin/ldconfig: /usr/local/lib64/libstdc++.so.6.0.26-gdb.pyc 不是 ELF 文件 - 起始处的魔数有误。

/sbin/ldconfig: /usr/local/lib64/libstdc++.so.6.0.26-gdb.pyo 不是 ELF 文件 - 起始处的魔数有误。

验证 : perl-File-Slurp-9999.19-19.el8.noarch 1/2

验证 : rlwrap-0.46.1-1.el8.x86_64 2/2

Installed products updated.

已安装:

perl-File-Slurp-9999.19-19.el8.noarch rlwrap-0.46.1-1.el8.x86_64

完毕!

2、测试

[oracle@node1 ~]$ rlwrap sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on 星期三 8月 23 18:53:27 2023

Version 19.3.0.0.0

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

SQL> connect sys as sysdba

输入口令:

已连接到空闲例程。

SQL> select * from zzy;

select * from zzy

*

第 1 行出现错误:

ORA-01034: ORACLE not available

相关推荐
deadknight94 小时前
表、索引统计信息锁定和解锁
数据库·oracle
安於宿命9 小时前
【MySQL】库和表的操作
数据库·mysql·oracle
椛椛~10 小时前
MySQL数据库操作
数据库·mysql·oracle
m0_653031361 天前
PostgreSQL与Oracle数据库相比有什么优势
数据库·postgresql·oracle
巴啦啦小魔仙变身1 天前
做到哪一步才算精通SQL
数据库·sql·oracle
xuanloyer1 天前
第二篇《Active Data Guard 实战:打造高可用数据库》(ADG)
运维·数据库·oracle
m0_748235951 天前
PostgreSQL在Linux环境下的常用命令总结
linux·postgresql·oracle
KINICH ahau2 天前
数据库1-2章
数据库·oracle
XiYang-DING2 天前
【数据库系统概论】第一章 绪论
数据库·oracle
码上飞扬2 天前
Oracle RAC配置原理详解:构建高可用与高性能的数据库集群
数据库·oracle·rac