Canceling an Interactive SQL command

An interrupt or stop operation stops current processing and prompts for the next command or action.

StepsTo interrupt an Interactive SQL command:

  1. To interrupt an Interactive SQL command, select Interrupt the SQL Statement from the toolbar, or select SQL > Stop.

If a command file is being processed, select “Stop,” “Continue,” or “Exit.”

Reported errors

When an abort is detected, one of three different errors will be reported depending upon when the abort is detected.

  1. If the abort is detected when Interactive SQL is processing the request (as opposed to the database engine), this message appears:

    ISQL command terminated by user
    

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

  2. If the cancel is detected by the database engine while processing a standard data manipulation command (SELECT, INSERT, and DELETE) and the engine is not running in bulk operations mode, this 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 abort is detected while the database engine is processing a data definition command (CREATE, DROP, ALTER, and so on) this 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 simply to cancel the current command.

This message also occurs when the database engine 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 engine to perform the automatic ROLLBACK.