본문 바로가기

Database/Oracle

118 - [Oracle 19C] Full backup for CDB and restoring

 

 

Full backup for CDB and restoring

# RMAN 을 위해서는 ARCHIVELOG mode = on, configure 'fast recovery area' 할 것.

 

 

2023.12.28 - [Database/Oracle] - 116 - [Oracle 19C] Enableing ARCHIVELOG mode.

 

116 - [Oracle 19C] Enableing ARCHIVELOG mode.

Enableing ARCHIVELOG mode. show user; show con_name; /* USER is "SYS" CON_NAME ------------------------------ CDB$ROOT */ select * from v$logfile; /* GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE CON_ID ---------- ------- ------- ------------------------

unsungit.tistory.com

 

 

2023.12.28 - [Database/Oracle] - 117 - [Oracle 19C] Configuring fast recovery area

 

117 - [Oracle 19C] Configuring fast recovery area

Configuring fast recovery area show user; show con_name; /* USER is "SYS" CON_NAME ------------------------------ CDB$ROOT */ The fast recovery area is an Oracle managed directory file system, or Oracle automatic storage management disk group that provides

unsungit.tistory.com

 

 

 

[oracle@test HONG]$ rman target=/

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Dec 27 16:36:21 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1680360448)

RMAN>

 

 

 

RMAN> list backup of database;

using target database control file instead of recovery catalog
specification does not match any backup in the repository

RMAN>

 

 

 

# note: if you did not find any files this mean no redo logs switch happened, the redo logs still no filled yet.
RMAN> list archivelog all;

specification does not match any archived log in the repository

RMAN>

 

 

 

RMAN> backup database plus archivelog;


Starting backup at 27-DEC-23
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=396 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=61 RECID=1 STAMP=1156696890
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2023_12_27/o1_mf_annnn_TAG20231227T164130_lrrnxthh_.bkp tag=TAG20231227T164130 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 27-DEC-23

Starting backup at 27-DEC-23
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnxvq7_.bkp tag=TAG20231227T164131 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/09D7302C9140311CE0639802A8C09C66/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzwvn_.bkp tag=TAG20231227T164131 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00039 name=/u01/app/oracle/oradata/ORCL/prod1/sysaux01.dbf
input datafile file number=00038 name=/u01/app/oracle/oradata/ORCL/prod1/system01.dbf
input datafile file number=00040 name=/u01/app/oracle/oradata/ORCL/prod1/undotbs01.dbf
input datafile file number=00041 name=/u01/app/oracle/oradata/ORCL/prod1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/0B73EA8BCA16194AE063E102A8C0E7DB/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzzxw_.bkp tag=TAG20231227T164131 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00043 name=/u01/app/oracle/oradata/ORCL/prod2/sysaux01.dbf
input datafile file number=00042 name=/u01/app/oracle/oradata/ORCL/prod2/system01.dbf
input datafile file number=00044 name=/u01/app/oracle/oradata/ORCL/prod2/undotbs01.dbf
input datafile file number=00045 name=/u01/app/oracle/oradata/ORCL/prod2/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/0B7428D9C0461DA3E063E102A8C06024/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrro0h25_.bkp tag=TAG20231227T164131 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/09D70B6E4F952A9DE0639802A8C03B0F/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrro0l7r_.bkp tag=TAG20231227T164131 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 27-DEC-23

Starting backup at 27-DEC-23
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=62 RECID=2 STAMP=1156696981
channel ORA_DISK_1: starting piece 1 at 27-DEC-23
channel ORA_DISK_1: finished piece 1 at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2023_12_27/o1_mf_annnn_TAG20231227T164301_lrro0ocz_.bkp tag=TAG20231227T164301 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 27-DEC-23

Starting Control File and SPFILE Autobackup at 27-DEC-23
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2023_12_27/o1_mf_s_1156696982_lrro0pkg_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 27-DEC-23

RMAN>

 

 

 

RMAN> list backup of database;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    1.38G      DISK        00:00:59     27-DEC-23
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164131
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnxvq7_.bkp
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 9861620    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/system01.dbf
  3       Full 9861620    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/sysaux01.dbf
  4       Full 9861620    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/undotbs01.dbf
  7       Full 9861620    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    505.75M    DISK        00:00:02     27-DEC-23
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164131
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/09D7302C9140311CE0639802A8C09C66/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzwvn_.bkp
  List of Datafiles in backup set 4
  Container ID: 3, PDB Name: ORCLPDB
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  9       Full 9861657    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
  10      Full 9861657    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
  11      Full 9861657    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
  12      Full 9861657    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    498.85M    DISK        00:00:02     27-DEC-23
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164131
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/0B73EA8BCA16194AE063E102A8C0E7DB/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzzxw_.bkp
  List of Datafiles in backup set 5
  Container ID: 6, PDB Name: PROD1
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  38      Full 9861675    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod1/system01.dbf
  39      Full 9861675    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod1/sysaux01.dbf
  40      Full 9861675    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod1/undotbs01.dbf
  41      Full 9861675    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod1/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    498.57M    DISK        00:00:01     27-DEC-23
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164131
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/0B7428D9C0461DA3E063E102A8C06024/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrro0h25_.bkp
  List of Datafiles in backup set 6
  Container ID: 7, PDB Name: PROD2
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  42      Full 9861680    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod2/system01.dbf
  43      Full 9861680    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod2/sysaux01.dbf
  44      Full 9861680    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod2/undotbs01.dbf
  45      Full 9861680    27-DEC-23              NO    /u01/app/oracle/oradata/ORCL/prod2/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7       Full    469.73M    DISK        00:00:01     27-DEC-23
        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164131
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/09D70B6E4F952A9DE0639802A8C03B0F/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrro0l7r_.bkp
  List of Datafiles in backup set 7
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  5       Full 9385626    18-DEC-23              NO    /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
  6       Full 9385626    18-DEC-23              NO    /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
  8       Full 9385626    18-DEC-23              NO    /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf

RMAN>

 

 

 

RMAN> list backup of controlfile;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    17.95M     DISK        00:00:00     27-DEC-23
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T163839
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2023_12_27/o1_mf_s_1156696719_lrrnrhhc_.bkp
  Control File Included: Ckp SCN: 9861488      Ckp time: 27-DEC-23

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    17.95M     DISK        00:00:00     27-DEC-23
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164302
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2023_12_27/o1_mf_s_1156696982_lrro0pkg_.bkp
  Control File Included: Ckp SCN: 9861701      Ckp time: 27-DEC-23

RMAN>

 

 

 

RMAN> list backup of spfile;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    17.95M     DISK        00:00:00     27-DEC-23
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T163839
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2023_12_27/o1_mf_s_1156696719_lrrnrhhc_.bkp
  SPFILE Included: Modification time: 27-DEC-23
  SPFILE db_unique_name: ORCL

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    17.95M     DISK        00:00:00     27-DEC-23
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20231227T164302
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2023_12_27/o1_mf_s_1156696982_lrro0pkg_.bkp
  SPFILE Included: Modification time: 27-DEC-23
  SPFILE db_unique_name: ORCL

RMAN>

 

 

 

[oracle@test ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 27 16:57:22 2023
Version 19.3.0.0.0

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


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

SQL> alter session set container=orclpdb;

Session altered.

SQL> create table hr.t111 ( name varchar2(100) );

Table created.

SQL>
SQL> insert into hr.t111 values('seoul');

1 row created.

SQL> commit;

Commit complete.

SQL>

 

 

 

RMAN> RUN
{
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;
}
2> 3> 4> 5> 6> 7> 8>

database closed
database dismounted
Oracle instance shut down

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area    1526723608 bytes

Fixed Size                     9135128 bytes
Variable Size               1107296256 bytes
Database Buffers             402653184 bytes
Redo Buffers                   7639040 bytes

Starting restore at 27-DEC-23
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=389 device type=DISK

skipping datafile 5; already restored to file /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
skipping datafile 6; already restored to file /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
skipping datafile 8; already restored to file /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORCL/system01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORCL/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnxvq7_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnxvq7_.bkp tag=TAG20231227T164131
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/ORCL/orclpdb/system01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/ORCL/orclpdb/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/ORCL/orclpdb/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/ORCL/orclpdb/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/09D7302C9140311CE0639802A8C09C66/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzwvn_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/09D7302C9140311CE0639802A8C09C66/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzwvn_.bkp tag=TAG20231227T164131
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00038 to /u01/app/oracle/oradata/ORCL/prod1/system01.dbf
channel ORA_DISK_1: restoring datafile 00039 to /u01/app/oracle/oradata/ORCL/prod1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00040 to /u01/app/oracle/oradata/ORCL/prod1/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00041 to /u01/app/oracle/oradata/ORCL/prod1/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/0B73EA8BCA16194AE063E102A8C0E7DB/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzzxw_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/0B73EA8BCA16194AE063E102A8C0E7DB/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrrnzzxw_.bkp tag=TAG20231227T164131
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00042 to /u01/app/oracle/oradata/ORCL/prod2/system01.dbf
channel ORA_DISK_1: restoring datafile 00043 to /u01/app/oracle/oradata/ORCL/prod2/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00044 to /u01/app/oracle/oradata/ORCL/prod2/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00045 to /u01/app/oracle/oradata/ORCL/prod2/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/0B7428D9C0461DA3E063E102A8C06024/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrro0h25_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/0B7428D9C0461DA3E063E102A8C06024/backupset/2023_12_27/o1_mf_nnndf_TAG20231227T164131_lrro0h25_.bkp tag=TAG20231227T164131
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 27-DEC-23

Starting recover at 27-DEC-23
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 27-DEC-23

Statement processed

RMAN>

 

 

 

[oracle@test ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 27 17:02:58 2023
Version 19.3.0.0.0

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


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

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

CON_NAME
------------------------------
ORCLPDB
SQL>

SQL> alter session set container=orclpdb;

Session altered.

SQL> select * from hr.t111;

NAME
------------------------------
seoul
SQL>