- Login as sysdba
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> show user
USER is "SYS"
SQL> alter session set container=orclpdb;
Session altered.
SQL> show con_name;
CON_NAME
------------------------------
ORCLPDB
SQL> show con_id;
CON_ID
------------------------------
3
SQL> select * from V$TABLESPACE;
TS# NAME INC BIG FLA ENC CON_ID
---------- ------------------------------ --- --- --- --- ----------
0 SYSTEM YES NO YES 3
1 SYSAUX YES NO YES 3
2 UNDOTBS1 YES NO YES 3
3 TEMP NO NO YES 3
5 USERS YES NO YES 3
- to Create orclpdb_admin @orclpdb
SQL> create user orclpdb_admin identified by orclpdb_admin
default tablespace users temporary tablespace temp account unlock;
User ORCLPDB_ADMIN created.
SQL> grant create session, dba to orclpdb_admin;
Grant succeeded.
SQL> select * from dba_users
where username=upper('orclpdb_admin');
/*
*/
- Login as new admin user @orclpdb
SQL> conn orclpdb_admin/orclpdb_admin@orclpdb
Connected.
SQL> show user
USER is "ORCLPDB_ADMIN"
SQL> show con_name
CON_NAME
------------------------------
ORCLPDB
SQL> select * from session_privs;
PRIVILEGE
----------------------------------------
ALTER SYSTEM
AUDIT SYSTEM
CREATE SESSION
...
237 rows selected.
This user is only for the PDB as orclpdb, not root container.
SQL> alter session set container=cdb$root;
ERROR:
ORA-01031: insufficient privileges
'Database > Oracle' 카테고리의 다른 글
72 - [Oracle 19C] System privileges with admin option. (1) | 2023.12.07 |
---|---|
71 - [Oracle 19C] Role granted another role (0) | 2023.12.06 |
69 - [Oracle 19C] to Create SYS user - example (0) | 2023.12.06 |
68 - [Oracle 19C] Administering User Security (0) | 2023.12.06 |
67 - [Oracle 19C] Common Roles (1) | 2023.12.05 |