How To Kill Session Without ALTER SYSTEM Authorization

 

Application developers may want to kill long-running queries. However, since application developers do not have ALTER SYSTEM privileges, they cannot execute the kill session command. Also, this authorization should not be given to users who are not dba.

There is a way for application developers to kill sessions without ALTER SYSTEM authorization. We may create a procedure to kill sessions and authorize the user to execute them.

Let’s create the following procedure under the SYS user and authorize the user to execute it.

 

Create Procedure Script:

 

User Authorization:

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *