My Oracle Support Banner

Ctrl-C Fails to Interrupt UPDATE Statement Using SQL*Plus 10g (Doc ID 554350.1)

Last updated on APRIL 03, 2019

Applies to:

SQL*Plus - Version 10.1.0.2 to 10.2.0.3 [Release Oracle10g]
Information in this document applies to any platform.
This problem can occur on any platform.
Generic UNIX platforms.

Symptoms

When run a script with UPDATE command using a 9i SQL*Plus executable and press Ctrl-C
<ENTER>
when the script prompts for input variable values, the script execution is
interrupted and Oracle updates zero rows. This is the expected behavior.

Now, when run the same script using a 10g SQL*Plus executable, the script does not stop after
pressing Ctrl-C  <ENTER> and proceeds to update all the rows on the table.

In checking V$SQL, the command is seen there without the WHERE clause. Oracle ignores that there
is a WHERE clause, and hence updates all records in the table.

Here is a sample script, call it test.sql, based on EMP demo table:

Notice that the UPDATE statement did not get cancelled and all records in table were updated.
The same problem does not happen using SQL*Plus 9i. With SQL*Plus 9i, zero rows get updated.

This problem reproduces on HP, Linux, and Sun Solaris; hence, problem is UNIX generic.
It does not reproduce on Windows.

Changes

Upgraded to Oracle Server 10g.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.