Sqlplus + rlwrap under Solaris

Source: Internet
Author: User
Http://inthirties.com: 90/thread-1389-1-1.html
I have previously written an article about how to use rlwrap in a Linux environment to make the sqlplu console the same as that in Linux.
Command history usage.

This makes it easier to use sqlplus, which is no different from Linux. Article see http://inthirties.com: 90/thread-1060-1-1.html

I used to use this method. If I had to write the previous commands one by one, it would be intolerable. So I found Readline and
Install rlwrap in Solaris.

Http://ivan.kartik.sk /? Min = 1151704800 & max = 1154383200
Or http://inthirties.com: 90/thread-1388-2-1.html

Installation Steps

[Root @ Solaris Oracle] gunzip readline-5.1-solaris-x86.gz

[Root @ Solaris Oracle] gunzip rlwrap-solaris-x86.gz

[Root @ Solaris Oracle] ls

Readline-5.1-solaris-x86

Rlwrap-solaris-x86

First install Readline,

[Root @ Solaris Oracle] pkgadd-D readline-5.1-solaris-x86

The following packages are available:

1 Readline

(X86) 5.1

Select package (s) You wish to process (or 'all' to process

All packages). (default: All )[?,??, Q]: Y

..................

Do you want to install these conflicting files [y, N ,?, Q] y

# Checking for Setuid/Setgid programs.

Installing Readline

# Installing Part 1 of 1.

/Usr/local/include/Readline/chardefs. h

/Usr/local/include/Readline/history. h

/Usr/local/include/Readline/keymaps. h

/Usr/local/include/Readline. h

/Usr/local/include/Readline/rlconf. h

/Usr/local/include/Readline/rlstdc. h

/Usr/local/include/Readline/rltypedefs. h

/Usr/local/include/Readline/Tilde. h

/Usr/local/lib/libhistory.

/Usr/local/lib/libhistory. So

/Usr/local/lib/libhistory. so.5

/Usr/local/lib/libreadline.

/Usr/local/lib/libreadline. So

/Usr/local/lib/libreadline. so.5

/Usr/local/prototype

[Verifying class]

Installation of was successful.

Install rlwrap again

[Root @ Solaris Oracle] pkgadd-D rlwrap-solaris-x86

The following packages are available:

1 rlwrap

(X86) 0.26

Select package (s) You wish to process (or 'all' to process

All packages). (default: All )[?,??, Q]:

.......

Do you want to install these conflicting files [y, N ,?, Q] y

# Checking for Setuid/Setgid programs.

Installing rlwrap

# Installing Part 1 of 1.

/Usr/local/bin/rlwrap

/Usr/local/man/Man1/rlwrap.1

/Usr/local/share/rlwrap/coqtop

/Usr/local/share/rlwrap/ftp

/Usr/local/share/rlwrap/testclient

[Verifying class]

Installation of was successful.

Try it out

[Oracle @ Solaris ~] Oracle_sid = + ASM1

[Oracle @ Solaris ~] Rlwrap sqlplus/As sysdba

SQL * Plus: Release 10.2.0.1.0-production on Wed APR 7 15:40:10 2010

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connected:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-
Production

With the partitioning, real Application Clusters, OLAP and Data
Mining options

SQL> exit

The direction arrow here is ready for use. To call out the previously used sqlplus command, just move up the arrow.

Modify/etc/profile

Join Alais.

Alias sqlplus = "rlwrap sqlplus"

Alias RMAN = "rlwrap RMAN"

Alias LSNRCTL = "rlwrap LSNRCTL"

Alias bbed = "rlwrap bbed"

Now, try these commands with your own command line mode.

Is it the same as Linux. You can use up and down arrows to view the commands.

  • Provides Oracle management/troubleshooting/optimization/installation/RAC/Backup Recovery technical services, and professional Oracle training and consulting services.
  • Mail: inthirties@gmail.com
  • MSN: inthirties@hotmail.com
  • QQ: inthirties@qq.com
  • Tel: 13828706466
  • Technical blog http://blog.csdn.net/inthirties
  • Personal site http://blog.inthirties.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.