본문 바로가기

Database/Oracle

72 - [Oracle 19C] System privileges with admin option.

 

 

  • Login as sysdba
-- system privileges with admin option.

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT


SQL> alter session set container=orclpdb;

Session altered.


SQL> create user test20 identified by test20;

User created.


SQL> grant connect to test20 with admin option;

Grant succeeded.

 

 

 

  • Login as test20
SQL> conn test20/test20@orclpdb
Connected.


SQL> show user
USER is "TEST20"


SQL> select * from session_privs;

PRIVILEGE
----------------------------------------
CREATE SESSION
SET CONTAINER


SQL> grant connect to hr;

Grant succeeded.

 

 

  • Revoke 
revoke connect from hr;