Contents Index Working with SQL statements in Interactive SQL Executing multiple statements

ASA Getting Started
  Using Interactive SQL
    Working with SQL statements in Interactive SQL

Canceling an Interactive SQL command


The Interrupt button on the Interactive SQL toolbar cancels a command.

A Cancel operation stops current processing and prompts for the next command. If a command file was being processed, or if there is more than one statement in the SQL Statements pane, you are prompted for an action to take (Stop Command File, Continue, or Exit Interactive SQL). These actions can be controlled with the Interactive SQL ON_ERROR option.

For information about the ON_ERROR option, see ON_ERROR option [ISQL].

Reported messages 

When an interruption is detected, one of three different messages is reported depending upon when the interruption is detected.

  1. If the interruption is detected when Interactive SQL is processing the request (as opposed to the database server), then the following message appears:

    ISQL command terminated by user

    Interactive SQL stops processing immediately and the current database transaction is left alone.

  2. If the interruption is detected by the database server while processing a data manipulation command (SELECT, INSERT, DELETE, or UPDATE), then the following message appears:

    Statement interrupted by user.

    The effects of the current command are undone, but the rest of the transaction is left intact.

  3. If the interruption is detected while the database server is processing a data definition command (CREATE, DROP, ALTER, etc.), the following message appears:

    Terminated by user -- transaction rolled back

    Since data definition commands all perform a COMMIT automatically before the command starts, the effect of the ROLLBACK is to just cancel the current command.

    This message also occurs when the database server is running in bulk operations mode executing a command that modifies the database (INSERT, UPDATE, or DELETE). In this case, ROLLBACK cancels not only the current command, but everything that has been done since the last COMMIT. In some cases, it may take a considerable amount of time for the database server to perform the automatic ROLLBACK.


Contents Index Working with SQL statements in Interactive SQL Executing multiple statements