Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to improve 2-2 after oracle installation how to flip through history commands like the Linux command line

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How can oracle flip through history commands like the Linux command line?

If you enter a piece of code or sql in oracle, you will find a syntax error after execution, or you may want to view the previously entered command.

Download rpm package rlwrap (32-bit and 64-bit rpm packages are provided in the attachment)

Http://rpmfind.net/linux/rpm2html/search.php?query=rlwrap

Install rlwrap-0.30-1.el5.i386.rpm

Rpm-ivh rlwrap-0.30-1.el5.i386.rpm

Modify the environment variables of the ORACLE user to generate rlwrap-related command aliases

Su-oracle

Vi .bash _ profile

# add at the end

Alias sql='rlwrap sqlplus'

Alias sqlplus='rlwrap sqlplus'

When alias lsnrctl='rlwrap lsnrctl'## is used to manage the monitoring service, you can turn over the history command with the up and down keys.

Alias rman='rlwrap rman'## for rman can flip the history command up and down

Reload .bash _ profile

Source .bash _ profile

If you have already started oracle or entered the instance, ask exit,shoutdown to restart oracle to enter the instance.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report