To unlock the HR schema in the pluggable database
SQL> startup;
ORACLE instance started.
Total System Global Area 1526723608 bytes
Fixed Size 9135128 bytes
Variable Size 889192448 bytes
Database Buffers 620756992 bytes
Redo Buffers 7639040 bytes
Database mounted.
Database opened.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB MOUNTED
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> alter session set container=orclpdb;
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 ORCLPDB MOUNTED
SQL> show con_name
CON_NAME
------------------------------
ORCLPDB
SQL>
set lines 20
set pages 20
col USERNAME for a30
col LIMIT for a30
샘플 스키마 HR 로 접속하기
ssion set container=orclpdb;
Session altered.
SQL> alter user hr account unlock;
User altered.
SQL> alter user hr identified by hr;
User altered.
SQL> show con_name
CON_NAME
------------------------------
ORCLPDB
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 ORCLPDB READ WRITE NO
SQL> conn hr/hr@orclpdb;
Connected.
SQL> select table_name from user_tables;
TABLE_NAME
--------------------------------------------------------------------------------
COUNTRIES
REGIONS
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY
7 rows selected.
SQL>
'Database > Oracle' 카테고리의 다른 글
19 - [Oracle 19C] Oracle Data Dictionary (0) | 2023.11.16 |
---|---|
18 - [Oracle 19C] saving and running scripts (0) | 2023.11.16 |
16 - [Oracle 19C] connecting using tnsnames.ora (0) | 2023.11.16 |
15 - [Oracle 19C] Easy connect method (0) | 2023.11.16 |
14 - [Oracle 19C] Pluggable database - open, save (0) | 2023.11.15 |