disconnect_user disconnects clients whose username matches the username_pattern string given as an argument, and returns an integer value giving the number of clients disconnected. This can be used after DELETE USER or REVOKE statement to make sure that the affected user has no open connections.
The number of clients disconnected is returned.
Parameter data type checking errors
This is how the DBA can close all sessions for all users who name starts with db, including 'dba' which is the DBA itself.
SQL> disconnect_user ('db*'); *** Error 08S01: [Virtuoso Driver]CL065: Lost connection to server at line 7 (7) of Top-Level: disconnect_user ('db*') bash$