How To Cancel A SQL Statement In 18c

Until now is you want to cancel a sql you must kill (in the worst of the cases) or disconnect (in the best) the session who execute the statement. In the new release of Oracle (18c) you can “kill” a statement without kill the session. There are a new clause “cancel sql” into the “alter system” to perform this action.

You need the sqlid and the sid and serial# for session executing the sql_id which you want to kill. The format is show below;

alter system cancel sql ‘sid, serial#, sql_id’;

and an example;

alter system cancel sql ‘403, 35122, 77jhfmw06g05u’;

HTH – Antonio NAVARRO

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s