Pluggable Database (PDB) Migration & Upgrade from 12c to 19c using Full Transportable Tablespace Export-Import
There are many ways to migrate PDB like Remote Clone, Unplug – Plug, RMAN. Here we will explore Full transportable tablespace export/import method that is fast and efficient. We will be migrating a pluggable database (TESTHIST) running on Oracle 12C in Windows OS to Oracle 19C in Oracle Linux which both of them have Little Endian….so there will be no conversion process taking in place.
With Full Transportable Tablespace Export/Import combines the benefit of both Transportable Tablespace & Export/Import. You need to transfer only the user datafiles to the target host and use Expdp/Impdp to take metadata information backup like Table definition, Grants, Procedure, Triggers, etc, and import them into the target database and will upgrade your PDB directly to the source version.
Click here to view full export/import log
For Pluggable Database (PDB) Migration & Upgrade from 12c to 19c using Remote Clone Click here to read more
Below are the high-level steps we will follow to perform Migration & Upgrade
1. Validate Source PDB
2. Validate Target CDB
3. Check User tablespaces are self-contained
4. Create metadata dump
5. Copy the dump file and the data file to the destination database server
6. Create empty PDB in Target CDB
7. Add PDB TNS Entry and create datapump directory
8. Import medadata
9. Verify new PDB
Below are setup details and the same will be used in this demonstration.
Sr. No. | OS | Hostname | IP | CDB@PDB | DB Version |
1 | Window | test-machine01 | 192.168.114.177 | CDB1@TESTHIST | 12.1.0.2.0 |
2 | Oracle Linux | test-machine02 | 192.168.114.176 | CDB2@TESTHIST | 19.3.0.0.0 |
Step 1. Check Source PDB: Query view: V$TRANSPORTABLE_PLATFORM to identify the endian format of your operating system. Here we will migrate PDB: TESTHIST which has user tablespace: TEST_DATA and application user: APP_USER.
C:\Users\>sqlplus sys as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 2 16:51:04 2022
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
SQL> set lines 300
SQL>
SQL> SELECT D.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM TP, V$DATABASE D WHERE TP.PLATFORM_ID = D.PLATFORM_ID;
PLATFORM_NAME ENDIAN_FORMAT
----------------------------------------------------------------------------------------------------- --------------
Microsoft Windows x86 64-bit Little
SQL>
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
5 TESTHIST READ WRITE NO
SQL> alter session set container=TESTHIST;
Session altered.
SQL>
SQL> select instance_name, con_id, version from v$instance;
INSTANCE_NAME CON_ID VERSION
---------------- ---------- -----------------
cdb1 0 12.1.0.2.0
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
6 TESTHIST READ WRITE NO
SQL>
SQL> select count(*) from dba_objects where owner='APP_USER';
COUNT(*)
----------
75
SQL>
SQL>
SQL>
SQL> select distinct tablespace_name from dba_segments where owner='APP_USER';
TABLESPACE_NAME
------------------------------
TEST_DATA
SQL>
SQL>
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
TEMP
TEST_DATA
SQL> select name from v$datafile;
NAME
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
H:\MISAPP1\ORADATA_2\UNDOTBS01.DBF
H:\MISAPP1\ORADATA_2\TESTHIST\SYSTEM01.DBF
H:\MISAPP1\ORADATA_2\TESTHIST\SYSAUX01.DBF
H:\MISAPP1\ORADATA_2\TESTHIST\TEST_DATA_01.DBF
H:\MISAPP1\ORADATA_2\TESTHIST\TEST_DATA_02.DBF
SQL>
SQL> set lines 300
SQL> set pages 300
SQL> COL comp_id for a15
SQL> COL status for a10
SQL> COL version for a15
SQL> COL comp_name for a40
SQL> SELECT SUBSTR(comp_id,1,15) comp_id, status, SUBSTR(version,1,10) version, SUBSTR(comp_name,1,40) comp_name FROM dba_registry;
COMP_ID STATUS VERSION COMP_NAME
--------------- ---------- --------------- ----------------------------------------
DV VALID 12.1.0.2.0 Oracle Database Vault
APEX VALID 4.2.5.00.0 Oracle Application Express
OLS VALID 12.1.0.2.0 Oracle Label Security
SDO VALID 12.1.0.2.0 Spatial
ORDIM VALID 12.1.0.2.0 Oracle Multimedia
CONTEXT VALID 12.1.0.2.0 Oracle Text
OWM VALID 12.1.0.2.0 Oracle Workspace Manager
XDB VALID 12.1.0.2.0 Oracle XML Database
CATALOG VALID 12.1.0.2.0 Oracle Database Catalog Views
CATPROC INVALID 12.1.0.2.0 Oracle Database Packages and Types
JAVAVM VALID 12.1.0.2.0 JServer JAVA Virtual Machine
XML VALID 12.1.0.2.0 Oracle XDK
CATJAVA VALID 12.1.0.2.0 Oracle Database Java Packages
APS VALID 12.1.0.2.0 OLAP Analytic Workspace
XOQ VALID 12.1.0.2.0 Oracle OLAP API
RAC OPTION OFF 12.1.0.2.0 Oracle Real Application Clusters
16 rows selected.
SQL>
Step 2. Check Target CDB: Query view: V$TRANSPORTABLE_PLATFORM to identify the endian format of your operating system. Since both source and target operating system is Little Endiness no conversion is required. We can directly attach the datafiles to our target PDB.
[oracle@test-machine02 ~]$
[oracle@test-machine02 ~]$ sqlplus sys as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Nov 9 09:53:35 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> set lines 300
SQL> SELECT D.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM TP, V$DATABASE D WHERE TP.PLATFORM_ID = D.PLATFORM_ID;
PLATFORM_NAME ENDIAN_FORMAT
----------------------------------------------------------------------------------------------------- --------------
Linux x86 64-bit Little
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
Step 3. Check User tablespaces are self-contained: The following check will ensure from the physical and logical side that there are no dependency user objects stored under SYSTEM, SYSAUX tablespaces. As we need to transfer only User tablespaces to the target host. Execute the below procedure and check for any violation. if no violation set the source tablespaces in “READ_ONLY” mode.
SQL>
SQL> alter session set container=TESTHIST;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
TESTHIST
SQL>
SQL> EXECUTE DBMS_TTS.TRANSPORT_SET_CHECK('TEST_DATA', TRUE);
PL/SQL procedure successfully completed.
SQL> SELECT * FROM TRANSPORT_SET_VIOLATIONS;
no rows selected
SQL>
SQL> alter tablespace TEST_DATA read only;
Tablespace altered.
SQL>
SQL>
Step 4. Create metadata dump: Take the metadata backup using the below expdp command. Please note we are using tnsname: testhist to connect to our source PDB: TESTHIST. Since it’s only metadata backup and not actual user data backup, that is very fast and also at the end of expdp command, it will mention datafiles need to transfer to the destination or target host.
C:\Users\>
C:\Users\> expdp system/system123@testhist full=y transportable=always directory=DB_PUMP dumpfile=testhist_tts.dmp metrics=y exclude=statistics compression=all logfile=testhist_tts_export.log
Export: Release 12.1.0.2.0 - Production on Tue Nov 9 10:09:46 2021
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_FULL_01": system/********@testhist full=y transportable=always directory=DB_PUMP dumpfile=testhist_tts.dmp metrics=y exclude=statistics compression=a
ll logfile=testhist_tts_export.log
Startup took 4 seconds
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/PLUGTS_FULL/FULL/PLUGTS_TABLESPACE
Processing object type DATABASE_EXPORT/PLUGTS_FULL/PLUGTS_BLK
Completed 1 PLUGTS_BLK objects in 0 seconds
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Estimated 1 TABLE_DATA objects in 1 seconds
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Estimated 64 TABLE_DATA objects in 2 seconds
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Estimated 10 TABLE_DATA objects in 0 seconds
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Estimated 0 TABLE_DATA objects in 23 seconds
Total estimation using BLOCKS method: 4.265 MB
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Completed 1 MARKER objects in 1 seconds
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
Completed 1 MARKER objects in 0 seconds
. . exported "SYS"."AUDTAB$TBS$FOR_EXPORT" 4.921 KB 2 rows in 1 seconds
. . exported "SYS"."DBA_SENSITIVE_DATA" 0 KB 0 rows in 0 seconds
. . exported "SYS"."DBA_TSDP_POLICY_PROTECTION" 0 KB 0 rows in 0 seconds
. . exported "SYS"."FGA_LOG$FOR_EXPORT" 0 KB 0 rows in 0 seconds
. . exported "SYS"."NACL$_ACE_EXP" 5.726 KB 1 rows in 1 seconds
. . exported "SYS"."NACL$_HOST_EXP" 5.132 KB 1 rows in 0 seconds
. . exported "SYS"."NACL$_WALLET_EXP" 0 KB 0 rows in 0 seconds
. . exported "WMSYS"."WM$EXP_MAP" 5.273 KB 3 rows in 1 seconds
Completed 1 DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA objects in 1 seconds
Completed 64 DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA objects in 2 seconds
Completed 10 DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA objects in 3 seconds
Completed 0 DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA objects in 0 seconds
Master table "SYSTEM"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_FULL_01 is:
E:\UCAS_BACKUP\TESTHIST_TTS.DMP
******************************************************************************
Datafiles required for transportable tablespace UCAS_DATA:
H:\MISAPP1\ORADATA_2\TESTHIST\TEST_DATA_01.DBF
H:\MISAPP1\ORADATA_2\TESTHIST\TEST_DATA_02.DBF
Job "SYSTEM"."SYS_EXPORT_FULL_01" successfully completed at Tue Nov 9 10:12:47 2021 elapsed 0 00:02:55
C:\Users\>
Step 5. Copy the dump file and the datafiles to the destination database server: We are using utility pscp.exe to transfer dumpfile and datafiles to the destination database’s host. Please note we are transferring all datafiles to the location: /data01/oradata_2/testhist/ as in the next step and we will use the same location as PDB datafiles directory.
H:\MISAPP1\ORADATA_2\TESTHIST>
H:\MISAPP1\ORADATA_2\TESTHIST>E:\BACKUP\pscp.exe TEST_DATA_01.DBF oracle@test-machine02:/data01/oradata_2/testhist
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 c5:ea:96:94:84:e0:f2:57:87:e8:87:fe:c4:43:45:b8
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
oracle@test-machine02 password:
TEST_DATA_01.DBF | 6195528 kB | 10645.2 kB/s | ETA: 00:00:00 | 100%
H:\MISAPP1\ORADATA_2\TESTHIST>
H:\MISAPP1\ORADATA_2\TESTHIST>E:\BACKUP\pscp.exe TEST_DATA_02.DBF oracle@test-machine02:/data01/oradata_2/testhist
oracle@test-machine02 password:
TEST_DATA_02.DBF | 6194184 kB | 27529.7 kB/s | ETA: 00:00:00 | 100%
H:\MISAPP1\ORADATA_2\TESTHIST>
E:\BACKUP>
E:\BACKUP>pscp.exe TESTHIST_TTS.DMP oracle@test-machine02:/u01/DB_PUMP
oracle@test-machine02 password:
TESTHIST_TTS.DMP | 1132 kB | 1132.0 kB/s | ETA: 00:00:00 | 100%
E:\BACKUP>
Step 6. Create empty PDB in Target CDB: Create PDB: TESTHIST in the destination database. Please note we are using option FILE_NAME_CONVERT as we want to store all datafiles under the directory: /data01/oradata_2/testhist/
[oracle@test-machine02 ~]$
[oracle@test-machine02 ~]$ sqlplus sys as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Feb 6 17:03:55 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL>
SQL> CREATE PLUGGABLE DATABASE TESTHIST ADMIN USER PDB_ADMIN IDENTIFIED BY test123
FILE_NAME_CONVERT=('/data01/oradata_2/MISAPP1/pdbseed/','/data01/oradata_2/testhist/'); 2
Pluggable database created.
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 TESTHIST MOUNTED
SQL> alter pluggable database TESTHIST open;
Pluggable database altered.
SQL>
SQL>
SQL> alter session set container=TESTHIST;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
TESTHIST
SQL>
Step 7. Add PDB TNS Entry and create datapump directory: Add the entry in tnsname and create dump directory both parameters are required in impdp operation.
[oracle@test-machine02 ~]$ cd /u01/app/oracle/product/19.0.0/db_1/network/admin
[oracle@test-machine02 admin]$
[oracle@test-machine02 admin]$ vi tnsnames.ora
TESTHIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test-machine02)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testhist)
)
)
:wq!
[oracle@test-machine02 admin]$ tnsping testhist
TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 06-FEB-2022 17:08:17
Copyright (c) 1997, 2019, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/19.0.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-machine02)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = testhist)))
OK (0 msec)
[oracle@test-machine02 admin]$
SQL> show con_name
CON_NAME
------------------------------
TESTHIST
SQL>
SQL> CREATE DIRECTORY DB_PUMP AS '/u01/DB_PUMP';
Directory created.
SQL>
Step 8. Import medadata: Once all the above steps are done, we are going to start import using the below command.
[oracle@test-machine02 admin]$
[oracle@test-machine02 admin]$ impdp system/ucas123@testhist directory=DB_PUMP dumpfile=TESTHIST_TTS.DMP logfile=TESTHIST_TTS_IMP.log metrics=y transport_datafiles='/data01/oradata_2/testhist/TEST_DATA_01.DBF','/data01/oradata_2/testhist/TEST_DATA_02.DBF'
Import: Release 19.0.0.0.0 - Production on Wed Feb 2 17:07:10 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
UDI-28002: operation generated ORACLE error 28002
ORA-28002: the password will expire within 4 days
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
W-1 Startup took 0 seconds
W-1 Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
W-1 Source time zone is -05:00 and target time zone is +03:00.
Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/********@testhist directory=DB_PUMP dumpfile=TESTHIST_TTS.DMP logfile=TESTHIST_TTS_IMP.log metrics=y transport_datafiles=/data01/oradata_2/testhist/TEST_DATA_01.DBF,/data01/oradata_2/testhist/TEST_DATA_02.DBF
W-1 Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
W-1 Completed 1 MARKER objects in 1 seconds
W-1 Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
W-1 Completed 1 MARKER objects in 1 seconds
W-1 Processing object type DATABASE_EXPORT/PLUGTS_FULL/PLUGTS_BLK
W-1 Completed 1 PLUGTS_BLK objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/TABLESPACE
ORA-31684: Object type TABLESPACE:"TEMP" already exists
W-1 Completed 1 TABLESPACE objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/PROFILE
W-1 Completed 1 PROFILE objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/SYS_USER/USER
ORA-31685: Object type USER:"SYS" failed due to insufficient privileges. Failing sql is:
ALTER USER "SYS" IDENTIFIED BY VALUES 'S: ;H: ;T: ; ' TEMPORARY TABLESPACE "TEMP"
W-1 Completed 1 USER objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/SCHEMA/USER
ORA-31684: Object type USER:"PDB_ADMIN" already exists
W-1 Completed 64 TABLE objects in 6 seconds
W-1 Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
W-1 . . imported "WMSYS"."E$CONSTRAINTS_TABLE$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$LOCKROWS_INFO$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$UDTRIG_INFO$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "SYS"."AMGT$DP$DAM_CONFIG_PARAM$" 5.117 KB 14 rows in 0 seconds using direct_path
W-1 . . imported "SYS"."DP$TSDP_PARAMETER$" 4.929 KB 1 rows in 0 seconds using direct_path
W-1 . . imported "SYS"."DP$TSDP_POLICY$" 4.898 KB 1 rows in 0 seconds using direct_path
W-1 . . imported "SYS"."DP$TSDP_SUBPOL$" 4.984 KB 1 rows in 0 seconds using direct_path
W-1 . . imported "SYSTEM"."REDO_DB_TMP" 7.281 KB 1 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$BATCH_COMPRESSIBLE_TABLES$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$CONS_COLUMNS$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$ENV_VARS$" 4.976 KB 3 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$EVENTS_INFO$" 4.960 KB 12 rows in 1 seconds using direct_path
W-1 . . imported "WMSYS"."E$HINT_TABLE$" 5.835 KB 75 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$MODIFIED_TABLES$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$MP_GRAPH_WORKSPACES_TABLE$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$MP_PARENT_WORKSPACES_TABLE$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$NESTED_COLUMNS_TABLE$" 0 KB 0 rows in 0 seconds using direct_path
W-1 . . imported "WMSYS"."E$NEXTVER_TABLE$" 5.015 KB 1 rows in 0 seconds using direct_path
W-1 Completed 4 PROCOBJ objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
W-1 Completed 4 PROCACT_SCHEMA objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/AUDIT_UNIFIED/AUDIT_POLICY_ENABLE
W-1 Completed 2 AUDIT_POLICY_ENABLE objects in 0 seconds
W-1 Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER
W-1 Completed 1 MARKER objects in 1 seconds
W-1 Completed 1 DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA objects in 0 seconds
W-1 Completed 64 DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA objects in 1273 seconds
W-1 Completed 10 DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA objects in 15 seconds
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" completed with 51 error(s) at Wed Feb 2 17:09:21 2022 elapsed 0 00:02:07
[oracle@test-machine02 admin]$
Step 9. Verify new PDB: Please note we had 51 error(s) in import operation the reason for this is if you compare number of components in DBA_REGISTRY in source and target PDB. Target PDB has fewer components than Source PDB, so it’s a good idea to install missing components in Target PDB before we start import.
[oracle@test-machine02 admin]$
[oracle@test-machine02 admin]$ sqlplus sys as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 2 17:11:38 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 TESTHIST READ WRITE NO
SQL> alter session set container=TESTHIST;
Session altered.
SQL>
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/data01/oradata_2/testhist/system01.dbf
/data01/oradata_2/testhist/sysaux01.dbf
/data01/oradata_2/testhist/undotbs01.dbf
/data01/oradata_2/testhist/TEST_DATA_01.DBF
/data01/oradata_2/testhist/TEST_DATA_02.DBF
SQL>
SQL> select count(*) from dba_objects where owner='APP_USER';
COUNT(*)
----------
75
SQL> select instance_name, con_id, version_full from v$instance;
INSTANCE_NAME CON_ID VERSION
---------------- ---------- -----------------
cdb2 0 19.3.0.0.0
SQL>
SQL>
SQL> COL comp_id for a15
COL status for a10
COL version for a15
COL comp_name for a40
SELECT SUBSTR(comp_id,1,15) comp_id, status, SUBSTR(version,1,10) version, SUBSTR(comp_name,1,40) comp_name FROM dba_registry;
COMP_ID STATUS VERSION COMP_NAME
--------------- ---------- --------------- ----------------------------------------
CATALOG VALID 19.0.0.0.0 Oracle Database Catalog Views
CATPROC VALID 19.0.0.0.0 Oracle Database Packages and Types
RAC OPTION OFF 19.0.0.0.0 Oracle Real Application Clusters
XDB VALID 19.0.0.0.0 Oracle XML Database
OWM VALID 19.0.0.0.0 Oracle Workspace Manager
SQL>
Click here to know about Clone PDB to another CDB using RMAN Active Duplicate in Oracle on New Host.
This document is just for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.
Hope so you like this article!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to understand more about our pursuit.
Related Articles
- Oracle Critical Database Patch ID for October 2024 along with enabled Download Link
- Oracle Critical Database Patch ID for July 2024 along with enabled Download Link
- Oracle Critical Database Patch ID for April 2024 along with enabled Download Link
- Oracle Critical Database Patch ID for April 2023 along with enabled Download Link
- Oracle Critical Database Patch ID for January 2023 along with enabled Download Link