Opening a Database in Restricted Mode
Published by :
Obay Salah , November 19, 2024
In this mode, users are prevented from entering the database unless the user has the RESTRICTED SESSION PRIVILEGE privilege.
In fact, this mode is useful sometimes, for example, when you are doing an Export of the database and you do not want users to enter the database.
STARTUP RESTRICT;
or
ALTER SYSTEM ENABLE RESTRICTED SESSION;
Now all users who do not have RESTRICTED SESSION PRIVILEGE privilege cannot enter the database.
You can also end all connections of users who connected before applying RESTRICTED SESSION mode in two steps:-
1- Determine the SESSION that we want to end by using the following query:
SELECT SID, SERIAL# FROM V$SESSION ;
2- end session
'ALTER SYSTEM KILL SESSION '153,5 ;
Comments
no comment yet!