Disconnect user sessions
As an administrator, we have the ability to disconnect you in several ways. Some are more “polite”, others a little less.
To disconnect the user we need 2 values that we obtain by calling:
SELECT SID, SERIAL # FROM v $ session WHERE USERNAME = ‘username’;
Knowing these values we are able to disconnect the user. Here are the different ways:
ALTER SYSTEM KILL SESSION ‘sid, serial #’;
In our case, in place of sid and serial # we enter values  37  and  14. It will immediately disconnect the user’s session by telling him that his session has been terminated by the administrator (“your session has been killed”). Any unsigned actions that have not been approved by you will be automatically reversed (ROLLBACK).
ALTER SYSTEM DISCONNECT SESSION ’37, 14 ‘IMMEDIATE; –  will disconnect the user session. When you try to perform an action, you will be prompted to lose the connection to the database. All non-modified changes are automatically reversed (ROLLBACK).
ALTER SYSTEM DISCONNECT ’37, 14 ‘POST_TRANSACTION; –  will disconnect the user after the commit has been committed or rolled back (ROLLBACK). If you do not have any unconfirmed actions in the transaction (for example, only SELECTs are running), the session is immediately terminated.

exercises

1. Make 3 sessions as an HR user and then disconnect them with three known methods.

2. Check if you can break the .