Re: SQL Command list history on Linux

From: Sayan Malakshinov <xt.and.r_at_gmail.com>
Date: Fri, 5 Jan 2018 02:53:21 +0300
Message-ID: <CAOVevU7eiG-EKu2HppDGPN-yTYiSYmBer7WumpsL_PbCs3mabw_at_mail.gmail.com>



Hi Jeff,

Should file completion work in SQLcl v17.2? I've just tried on windows without success: _at_xpla +[tab] doesn't work

SQLcl: Release 17.2.0 Production on Fri Jan 05 02:48:58 2018 2018

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

Last Successful login time: Fri Jan 05 2018 02:48:59 +03:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> ho dir xplan.sql
 Volume in drive S has no label.
 Volume Serial Number is F819-E9CC

 Directory of S:\

2014-01-29  10:43 PM               341 xplan.sql
               1 File(s)            341 bytes
               0 Dir(s)  29,880,320,000 bytes free

SQL> _at_xpla

On Fri, Jan 5, 2018 at 2:42 AM, Jeff Smith <jeff.d.smith_at_oracle.com> wrote:

> No need, we already have tab complete for db object names AND os file
> names. You can even CD to whatever directory you want to read/write from
> AFTER starting up SQLcl.
>
>
>
> As for the editor, I don’t think our jline supports delete previous word…
>
>
>
> Jeff
>
>
>
>
>
> *From:* Sayan Malakshinov [mailto:xt.and.r_at_gmail.com]
> *Sent:* Thursday, January 04, 2018 6:30 PM
> *To:* gdherri_at_gmail.com
> *Cc:* neil_chandler_at_hotmail.com; Jeff Smith <jeff.d.smith_at_oracle.com>;
> oracle-l_at_freelists.org; gogala.mladen_at_gmail.com
>
> *Subject:* Re: SQL Command list history on Linux
>
>
>
> A couple of the main reasons why I'd prefer to use rlwrap even with sqlcl:
>
> 1) rlwrap supports auto-complete for files, so it helps to find any script
> especially when you have more than 1000 scripts
>
> 2) it's more convenient to edit text with readline: for example, I can
> easily delete previous word in sqlplus on linux and with rlwrap on windows,
> but how to do the same with SQLcl?
>
>
>
>
>
> On Fri, Jan 5, 2018 at 1:09 AM, Dave Herring <gdherri_at_gmail.com> wrote:
>
> Maybe I'm missing something, but if you use SQLcl as a client and connect
> from your laptop it gets past any issues of red tape, security clearance,
> etc.
>
> Dave
>
>
>
> On Thu, Jan 4, 2018 at 9:56 AM, Neil Chandler <neil_chandler_at_hotmail.com>
> wrote:
>
> Jeff,
>
>
>
> The main traction against sqlci isn't the several seconds to start rather
> than pretty much instant sqlplus (this becomes a factor when calling
> sqlplus multiple times in a loop), nor the fact it's far superior to
> sql*plus, but the red tape, security clearance, patching, etc, required to
> get new software (especially the Java component) onto the all of the DB
> servers. That pretty much nobody is using 12.2 in Production yet compounds
> it, so the red tape is required. There's nothing you can do about this that
> time won't cure except make the sqlci case increasingly compelling.
>
>
>
> I use vi and sqlplus because they are guaranteed to be there. If I was a
> perm DBA in a company long-term, I'd probably raise the paperwork to get it
> onto every DB server purely for the automatic column size adjustments if
> nothing else. Love that.
>
>
>
> Neil Chandler
>
>
>
>
> ------------------------------
>
> *From:* Jeff Smith <jeff.d.smith_at_oracle.com>
> *Sent:* 04 January 2018 15:11
> *To:* neil_chandler_at_hotmail.com; oracle-l_at_freelists.org;
> gogala.mladen_at_gmail.com
> *Subject:* RE: SQL Command list history on Linux
>
>
>
> Slow to start? Maybe a second, or 3? If it’s taking longer than that,
> please let me know.
>
>
>
> Java 8u50 or higher will be ok, which is about 2-2.5 years old?
>
>
>
> It’s a 20mb or so download, so takes less than a minute to install if you
> don’t have it. Less time than it takes maybe to setup rlwrap…esp if you’re
> on Windows.
>
>
>
> *From:* Neil Chandler [mailto:neil_chandler_at_hotmail.com]
> *Sent:* Thursday, January 04, 2018 7:59 AM
> *To:* oracle-l_at_freelists.org; gogala.mladen_at_gmail.com
> *Subject:* Re: SQL Command list history on Linux
>
>
>
> Mladen,
>
>
>
> What has that go to do with the original posters question?
>
> If you are developing PL/SQL in SQL*Plus, you're probably not doing it
> efficiently. SQL Developer is the better (free) tool for that, regardless
> of platform.
>
> SQLCI is great, but it's slow to start, requires a fairly recent Java
> release, and only natively available from 12.2.
>
> If you want Windows-like editing on a Linux SQL*Plus (or dgmgrl, rman or
> whatever), use rlwrap.
>
>
>
> regards
>
>
>
> Neil Chandler.
>
> Database Guy.
>
>
> ------------------------------
>
> *From:* oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on
> behalf of Mladen Gogala <gogala.mladen_at_gmail.com>
> *Sent:* 04 January 2018 10:57
> *To:* oracle-l_at_freelists.org
> *Subject:* Re: SQL Command list history on Linux
>
>
>
> On 01/02/2018 04:51 PM, Neil Chandler wrote:
>
> Jeff,
>
>
>
> My preferred solution is to install "rlwrap" [ e.g. "yum install rlwrap" -
> check out https://github.com/hanslub42/rlwrap
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_hanslub42_rlwrap&d=DwMFAw&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=N2hWu5HFsaIjmMkjQbnlokJ7uinNZMgPVk8rqPT9esM&m=0bds7QIoykh2KktiFwI5q5NtAunsmhvpPbDLFAGKbBY&s=cRMpNNnqbVGwt9R-SUJkdE4mCdC-1KZy0LkLX77BvUY&e=>
> ] it provides similar functionality to a windows CMD environment. You just
> call the command you want to use via rlwrap
>
>
>
> e.g. rlwrap sqlplus, or rlwrap dgmgrl
>
>
>
> To keep thing simple, you can alias it
>
>
>
> alias rsql='rlwrap sqlplus'
>
> alias rdg='rlwrap dgmgrl'
>
>
>
> regards
>
>
>
> Neil Chandler
>
>
>
> Hi Neil,
> Rlwrap is not an equivalent solution. The "rlwrap" trick breaks editing of
> PL/SQL code, which can be annoying. If you write a multi-line PL/SQL
> snippet and something goes wrong, "ed" will only return a part of the
> snippet. SQLCl will do the right thing and give you back the entire
> procedure. It has a primitive screen editor built into the code because
> arrow keys also work when editing the history commands. Also, SQLCl has
> "REPEAT" command which turns your SQLCl session into an instant monitor, if
> necessary. In addition to all that, there is Jeff Smith, who has been doing
> an outstanding job with the product and explaining it on this list. Jeff is
> extremely helpful and a very nice guy. And no, I don't work for Oracle
> Corp. and I don't plan on working for Oracle anytime soon.
> Regards
>
> --
>
> Mladen Gogala
>
> Oracle DBA
>
> http://mgogala.freehostia.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__mgogala.freehostia.com&d=DwMFAw&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=N2hWu5HFsaIjmMkjQbnlokJ7uinNZMgPVk8rqPT9esM&m=0bds7QIoykh2KktiFwI5q5NtAunsmhvpPbDLFAGKbBY&s=PcMyzBvpXVEJ8OtXmrHXL-cnBgMOPb4mBf88-fufLHU&e=>
>
>
>
> --
>
> Dave
>
>
>
>
>
> --
>
> Best regards,
> Sayan Malakshinov
>
> Oracle performance tuning engineer
>
> Oracle ACE Associate
> http://orasql.org
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__orasql.org&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=N2hWu5HFsaIjmMkjQbnlokJ7uinNZMgPVk8rqPT9esM&m=W-I1UmB65U62tfAJXJmuGop4outBbCj_ITwwOZOtCcc&s=2cl_SDexO0p2ksZEkX-KgOEII-e00GoDLpLwY5lgu6A&e=>
>

-- 
Best regards,
Sayan Malakshinov
Oracle performance tuning engineer
Oracle ACE Associate
http://orasql.org

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 05 2018 - 00:53:21 CET

Original text of this message