Site icon Database Tutorials

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:

Exit mobile version