Re: Ctrl C in SQLPlus exits Windows

From: Ram K <lambu999_at_gmail.com>
Date: Tue, 12 Mar 2019 15:48:57 -0500
Message-ID: <CAAKoEZ__H3P-uS7E46p7b7a=A8iWSPwLPjU8Vcoi4DRa0rwM7w_at_mail.gmail.com>



William, I found out that opening a DOS window and then launching SQLplus from there can do the trick: If I press Ctrl-C when the SQL is outputting, say a million rows, pressing Ctrl-C brings me back to the DOS prompt and from there I press the up arrow on the key board to start SQLPlus again.

Also considering installing Linux on my PC with perhaps vmware or any free virtualization software (any pointers?)

On Tue, Mar 12, 2019 at 10:14 AM William Robertson < william_at_williamrobertson.net> wrote:

> For the scenario where you call Windows sqlplus.exe from something else
> and a Ctrl-C inconveniently closes the window, I think the best you can do
> is change the command line from plain "sqlplus.exe" to "cmd /k
> sqlplus.exe", so that exiting drops out to the command prompt and you still
> at least have your window.
>
> I’ve just made this change in PL/SQL Developer and it's working quite
> well. Thanks for the idea!
>
> William Robertson
>
> On 12 Mar 2019, at 11:12, Mladen Gogala <gogala.mladen_at_gmail.com> wrote:
>
> As for interrupting SQL, there is the following command which works in
> some versions newer than 9i:
>
> ALTER SYSTEM CANCEL SQL 'SID, SERIAL[, _at_INST_ID][, SQL_ID]';
>
>
> If that doesn't happen to work in your database, you can always try with
> kill -SIGURG <pid executing SQL>. That is actually what the above command
> does.
> Regards
>
> On 3/11/19 10:26 AM, Tim Hall wrote:
>
> I would expect SQLcl to work fine on Ubuntu. Just unzip and go. Never
> tried it though... :)
> https://oracle-base.com/articles/misc/sqlcl-installation
>
> SQLcl on Windows will also close as a result of a CTRL+C. At least it
> does for me.
>
> Cheers
>
> Tim...
>
>
> On Mon, Mar 11, 2019 at 1:59 PM Mladen Gogala <gogala.mladen_at_gmail.com> <gogala.mladen_at_gmail.com> wrote:
>
> I am using Ubuntu 18.04 so the only thing I can use is an instant client.
>
> Regards
>
> On 3/11/19 9:40 AM, Andy Sayer wrote:
>
> In 18c I’ve found that the behaviour is now:
> Works half the time.
> The rest of the time it doesn’t do anything until when the statement would have started returning anything, it stops and returns control then.
>
> Try upgrading your Oracle Client version
>
> Thanks,
> Andy
>
> On Mon, 11 Mar 2019 at 12:04, Jeffrey Beckstrom <jbeckstrom_at_gcrta.org> <jbeckstrom_at_gcrta.org> wrote:
>
> For us, about half the time the sql only is killed and the other half sqlplus is killed.
>
> Jeffrey Beckstrom
> Lead Database Administrator
> Information Technology Department
> Greater Cleveland Regional Transit Authority
> 1240 W. 6th Street
> Cleveland, Ohio 44113
>
>
> "Mark W. Farnham" <mwf_at_rsiz.com> <mwf_at_rsiz.com> 3/10/19 11:35 AM >>>
>
> Open yourself another window, and since you must be DBA on your home play version, look up the server process you want to kill and kill it. The prompt should return to your sqlplus session awaiting you to log back on. (If memory serves. It’s been a long time.)
>
> I am not aware of a workaround for ctrl-c or inserting rubout in data from the keyboard to avoid crashing that window of sqlplus on the system you’re using.
>
> Probably there are some virtual wrapper VM software varieties on which you can run a guest of windows that will behave differently.
>
> mwf
>
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org>] On Behalf Of Mladen Gogala
> Sent: Sunday, March 10, 2019 4:29 AM
> To: oracle-l_at_freelists.org
> Subject: Re: Ctrl C in SQLPlus exits Windows
>
> Hi Ram!
> What would you like to interrupt? Interrupt signal is always dispatched to the invoking process and it kills it. The sqlplus is not bad, it was just drawn that way, to quote Jessica Rabbit. I would try with SQLcl, Java plug in replacement for SQL*Plus. As I use Linux, I am not sure that this will work, but it's worth trying. Jeff Smith can probably tell you more.
> Regards
> On 3/10/19 3:58 AM, Ram K wrote:
>
> Installed Oracle in my home Windows PC and playing around with it. But pressing Ctrl-C always exits SQL Plus, when I run queries. grr... Tried searching online and found this:
> https://grokbase.com/t/freelists.org/oracle-l/095myarkwd/11g-sqlplus-on-windows-and-ctrl-c
>
> Is there a solution for Ctrl C only to interrupt and not to exit SQL Plus in windows.
>
> --
> Thanks,
> Ram.
>
> --
>
> Mladen Gogala
>
> Database Consultant
>
> Tel: (347) 321-1217
>
> --
> Mladen Gogala
> Database Consultant
> Tel: (347) 321-1217
>
> --
> Mladen Gogala
> Database Consultant
> Tel: (347) 321-1217
>
>

-- 
Thanks,
Ram.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 12 2019 - 21:48:57 CET

Original text of this message