I will be sharing simple SQL queries that will help you manage Oracle database users.
Article full link is here: https://www.support.dbagenesis.com/post/oracle-user-management
3. HOW TO LOCK/UNLOCK USER ACCOUNTS
HOW TO CREATE NEW USER IN DATABASE
CHANGE USER PASSWORD
4. HOW TO CHECK DATABASE DEFAULT TABLESPACE
GRANT/REVOKE USER PERMISSIONS
Note: When you create a new user, you directly cannot
connect to the sqlplus because the new user lacks
CREATE SESSION privilage
5. GRANT QUOTA ON A TABLESPACE TO USER
Note: Allocating quota doesn’t represent reserving the
space. If 2 or more users are sharing a tablespace, quota
will filled up in first come first serve basis
6. Note: The objects created in the old tablespace remain
unchanged even after changing a default tablespace for a
user
TO CHANGE DEFAULT TABLESPACE OF USER
DROP A USER
8. To check roles assigned to a user
To check permissions assigned to role
9. User Role Management
Providing multiple privileges to a user is time consuming. For example:
There are many sales clearks in office and they must be able to perform:
INSERT into the DEPT table
UPDATE the EMP table
DELETE from the BONUS table