본문 바로가기

Database/Oracle

81 - [Oracle 19C] Grant PDB admin - example

 

 

 

-- grant PDB admin
-- create new PDB or choose any PDB to test

SQL> show user
USER is "SYS"


SQL> show con_name

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


SQL> alter session set container=pdb10;

Session altered.


SQL> show con_name

CON_NAME
------------------------------
PDB10

SQL> grant create session, dba to pdb10_admin;

Grant succeeded.


-- login as pdb10_admin

[oracle@test ~]$ sqlplus pdb10_admin/Manager123#@pdb10

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 9 00:10:05 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Last Successful login time: Sat Dec 09 2023 00:08:26 +00:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>
SQL> show user
USER is "PDB10_ADMIN"
SQL>
SQL> show con_name

CON_NAME
------------------------------
PDB10
SQL>



SQL> select * from session_privs;

PRIVILEGE
----------------------------------------
DROP ANY ANALYTIC VIEW
ALTER ANY ANALYTIC VIEW
CREATE ANY ANALYTIC VIEW
CREATE ANALYTIC VIEW

...

237 rows selected.

SQL>