{"id":14741,"date":"2021-11-01T16:17:11","date_gmt":"2021-11-01T19:17:11","guid":{"rendered":"https:\/\/dev.dbarj.com.br\/?p=14741"},"modified":"2021-11-04T11:13:59","modified_gmt":"2021-11-04T14:13:59","slug":"how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb","status":"publish","type":"post","link":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/","title":{"rendered":"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB"},"content":{"rendered":"<p>Today my experiment will be upgrading 12.2 (Oct 2021 RU &amp; OJVM), running in the non-CDB mode, to the latest 19c version (currently it is 19.13) in multitenant architecture. The idea of this scenario is to validate and test not only the upgrade process but especially the downgrade strategy.<\/p>\n<p id=\"izKEZBt\"><img loading=\"lazy\" decoding=\"async\" width=\"1642\" height=\"714\" class=\"alignnone size-full wp-image-14743 \" src=\"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8.png\" alt=\"\" srcset=\"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8.png 1642w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8-300x130.png 300w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8-1024x445.png 1024w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8-768x334.png 768w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8-1536x668.png 1536w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8-870x378.png 870w\" sizes=\"auto, (max-width: 1642px) 100vw, 1642px\" \/><\/p>\n<p>I will keep the COMPATIBLE parameter of my 19c target  as 12.2.0 so I can try my fallback strategy without any issues.<\/p>\n<p>The first important thing to note here is that the non-cdb to pdb conversion is not reversible. So that&#8217;s why I plan to use transportable tablespaces as my fallback plan.<\/p>\n<p>However, before anything, <a href=\"https:\/\/dev.dbarj.com.br\/en\/2021\/07\/tranportable-tablespace-to-lower-release-is-it-possible\/\" target=\"_blank\" rel=\"noopener\">I&#8217;ve already blogged about transportable tablespace not working to previous releases<\/a>. So my plan will be breaking the fallback to 12.2 in 2 stages:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1624\" height=\"582\" class=\"alignnone size-full wp-image-14745 \" src=\"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4.png\" alt=\"\" srcset=\"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4.png 1624w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4-300x108.png 300w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4-1024x367.png 1024w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4-768x275.png 768w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4-1536x550.png 1536w, https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a927698bf4-870x312.png 870w\" sizes=\"auto, (max-width: 1624px) 100vw, 1624px\" \/><\/p>\n<p><strong>My playground will be:<\/strong><\/p>\n<h4><strong>Source DB (12.2):<\/strong><\/h4>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Running on server odbfcl-12-2-0-1<\/li>\n<li>12.2 with:\n<ul>\n<li>33192662;OJVM RELEASE UPDATE 12.2.0.1.211019 (33192662)<\/li>\n<li>33261817;Database Oct 2021 Release Update : 12.2.0.1.211019 (33261817)<\/li>\n<\/ul>\n<\/li>\n<li>Script used to create this database:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">dbca -silent -createDatabase \\\r\n-gdbName orcl \\\r\n-templateName General_Purpose.dbc \\\r\n-characterSet AL32UTF8 \\\r\n-createAsContainerDatabase false \\\r\n-databaseConfigType SINGLE \\\r\n-databaseType MULTIPURPOSE \\\r\n-datafileDestination \/u01\/app\/oracle\/oradata \\\r\n-dvConfiguration false \\\r\n-emConfiguration NONE \\\r\n-enableArchive false \\\r\n-memoryMgmtType AUTO_SGA \\\r\n-totalMemory 4000 \\\r\n-nationalCharacterSet AL16UTF16 \\\r\n-olsConfiguration false \\\r\n-recoveryAreaDestination \/u01\/app\/oracle\/fra \\\r\n-sampleSchema false \\\r\n-sid orcl \\\r\n-storageType FS \\\r\n-useOMF false \\\r\n-sysPassword \"Rodrigo.123\" \\\r\n-systemPassword \"Rodrigo.123\"<\/pre>\n<h4><strong>Target DB (19.13.0):<\/strong><\/h4>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Running on server odbfcl-19-0-0-0<\/li>\n<li>19c with:\n<ul>\n<li>33192694;OJVM RELEASE UPDATE: 19.13.0.0.211019 (33192694)<\/li>\n<li>33192793;Database Release Update : 19.13.0.0.211019 (33192793)<\/li>\n<li>29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)<\/li>\n<\/ul>\n<\/li>\n<li>Script used to create this database:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">dbca -silent -createDatabase \\\r\n-gdbName cdb19c \\\r\n-templateName My_Template.dbt \\\r\n-characterSet AL32UTF8 \\\r\n-createAsContainerDatabase true \\\r\n-numberOfPDBs 1 \\\r\n-pdbAdminPassword \"Rodrigo.123\" \\\r\n-pdbName PDB01 \\\r\n-useLocalUndoForPDBs true \\\r\n-databaseConfigType SINGLE \\\r\n-databaseType MULTIPURPOSE \\\r\n-datafileDestination \/u01\/app\/oracle\/oradata \\\r\n-dvConfiguration false \\\r\n-emConfiguration NONE \\\r\n-enableArchive false \\\r\n-memoryMgmtType AUTO_SGA \\\r\n-totalMemory 4000 \\\r\n-nationalCharacterSet AL16UTF16 \\\r\n-olsConfiguration false \\\r\n-recoveryAreaDestination \/u01\/app\/oracle\/fra \\\r\n-sampleSchema false \\\r\n-sid cdb19c \\\r\n-storageType FS \\\r\n-useOMF false \\\r\n-sysPassword \"Rodrigo.123\" \\\r\n-systemPassword \"Rodrigo.123\" \\\r\n-initParams compatible=12.2.0<\/pre>\n<p>Note that my target DB, I haven&#8217;t used the General_Purpose template as I want this database to have a lower COMPATIBLE (12.2.0). For more details on how to create a 19c with lower compatibility, check <a href=\"https:\/\/dev.dbarj.com.br\/en\/2021\/07\/creating-a-19c-database-with-a-lower-compatible-parameter\/\" target=\"_blank\" rel=\"noopener\">this article<\/a>.<\/p>\n<h4><strong>Fallback DB (12.2):<\/strong><\/h4>\n<p>I will need a transient fallback database for this exercise. It will be exactly the same as the Source DB but in CDB mode.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Running on server odbfcl-12-2-0-1<\/li>\n<li>12.2 with:\n<ul>\n<li>33192662;OJVM RELEASE UPDATE 12.2.0.1.211019 (33192662)<\/li>\n<li>33261817;Database Oct 2021 Release Update : 12.2.0.1.211019 (33261817)<\/li>\n<\/ul>\n<\/li>\n<li>Script used to create this database:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">dbca -silent -createDatabase \\\r\n-gdbName cdb12c \\\r\n-templateName General_Purpose.dbc \\\r\n-characterSet AL32UTF8 \\\r\n-createAsContainerDatabase true \\\r\n-numberOfPDBs 1 \\\r\n-pdbAdminPassword \"Rodrigo.123\" \\\r\n-pdbName PDB01 \\\r\n-useLocalUndoForPDBs true \\\r\n-databaseConfigType SINGLE \\\r\n-databaseType MULTIPURPOSE \\\r\n-datafileDestination \/u01\/app\/oracle\/oradata \\\r\n-dvConfiguration false \\\r\n-emConfiguration NONE \\\r\n-enableArchive false \\\r\n-memoryMgmtType AUTO_SGA \\\r\n-totalMemory 4000 \\\r\n-nationalCharacterSet AL16UTF16 \\\r\n-olsConfiguration false \\\r\n-recoveryAreaDestination \/u01\/app\/oracle\/fra \\\r\n-sampleSchema false \\\r\n-sid cdb12c \\\r\n-storageType FS \\\r\n-useOMF false \\\r\n-sysPassword \"Rodrigo.123\" \\\r\n-systemPassword \"Rodrigo.123\"<\/pre>\n<h4><span style=\"text-decoration: underline;\">Preparing my source environment<\/span><\/h4>\n<p>In my 12c non-cdb source system, I will create some user data, so I can check them later after the migration.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 oradata]$ export ORACLE_SID=orcl\r\n[oracle@odbfcl-12-2-0-1 oradata]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 28 15:49:29 2021\r\n\r\nCopyright (c) 1982, 2016, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n\r\nSQL&gt; CREATE USER TEST IDENTIFIED BY \"oracle\";\r\n\r\nUser created.\r\n\r\nSQL&gt; GRANT DBA TO TEST;\r\n\r\nGrant succeeded.\r\n\r\nSQL&gt; select file_name from dba_data_files;\r\n\r\nFILE_NAME\r\n--------------------------------------------------------------------------------\r\n\/u01\/app\/oracle\/oradata\/orcl\/users01.dbf\r\n\/u01\/app\/oracle\/oradata\/orcl\/undotbs01.dbf\r\n\/u01\/app\/oracle\/oradata\/orcl\/system01.dbf\r\n\/u01\/app\/oracle\/oradata\/orcl\/sysaux01.dbf\r\n\r\nSQL&gt; CREATE TABLESPACE TOOLS DATAFILE '\/u01\/app\/oracle\/oradata\/orcl\/tools01.dbf' size 10M;\r\n\r\nTablespace created.\r\n\r\nSQL&gt; CREATE TABLE TEST.T1 TABLESPACE TOOLS AS SELECT * FROM DBA_TABLES;\r\n\r\nTable created.\r\n\r\nSQL&gt; select count(*) from TEST.T1;\r\n\r\n  COUNT(*)\r\n----------\r\n      2108\r\n\r\nSQL&gt; exit\r\n\r\nDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production<\/pre>\n<h4><span style=\"text-decoration: underline;\">Upgrading first<\/span><\/h4>\n<p>The first step is to perform the upgrade of the 12c non-cdb to 19c cdb. I will use AutoUpgrade as it automates most of the tasks for me.<\/p>\n<p>My config file has:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">global.autoupg_log_dir=\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\r\nupg1.log_dir=\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/12c\r\nupg1.sid=orcl\r\nupg1.source_home=\/u01\/app\/oracle\/product\/12.2.0.1\/dbhome_1\r\nupg1.target_cdb=cdb19c\r\nupg1.target_home=\/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\r\nupg1.target_version=19\r\nupg1.target_pdb_name=pdb12c\r\nupg1.upgrade_node=localhost\r\nupg1.run_utlrp=yes\r\nupg1.timezone_upg=no<\/pre>\n<p>As I&#8217;m also moving to a new server, I will break the <strong>AutoUpgrade<\/strong> in the <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/upgrd\/examples-of-autoupgrade-workflows.html#GUID-04742E36-180F-4BEA-B693-9F4ED6A2073D\" target=\"_blank\" rel=\"noopener\">3 steps approach<\/a>. Please note you don&#8217;t need to break it into 3 phases if you have the new Oracle Home version already deployed on that same server.<\/p>\n<p>So first, let me start with the <strong>analyze<\/strong> phase:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ $ORACLE_HOME\/jdk\/bin\/java -jar autoupgrade.jar -config .\/upgrade.cfg -mode analyze\r\nAutoUpgrade 21.2.210721 launched with default options\r\nProcessing config file ...\r\n+--------------------------------+\r\n| Starting AutoUpgrade execution |\r\n+--------------------------------+\r\n1 databases will be analyzed\r\nType 'help' to list console commands\r\nupg&gt; Job 101 completed\r\n------------------- Final Summary --------------------\r\nNumber of databases            [ 1 ]\r\n\r\nJobs finished                  [1]\r\nJobs failed                    [0]\r\nJobs pending                   [0]\r\n\r\nPlease check the summary report at:\r\n\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/cfgtoollogs\/upgrade\/auto\/status\/status.html\r\n\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/cfgtoollogs\/upgrade\/auto\/status\/status.log<\/pre>\n<p>Next, the <strong>fixups<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ $ORACLE_HOME\/jdk\/bin\/java -jar autoupgrade.jar -config .\/upgrade.cfg -mode fixups\r\nAutoUpgrade 21.2.210721 launched with default options\r\nProcessing config file ...\r\n+--------------------------------+\r\n| Starting AutoUpgrade execution |\r\n+--------------------------------+\r\n1 databases will be processed\r\nType 'help' to list console commands\r\nupg&gt; Job 102 completed\r\n------------------- Final Summary --------------------\r\nNumber of databases            [ 1 ]\r\n\r\nJobs finished                  [1]\r\nJobs failed                    [0]\r\nJobs pending                   [0]\r\n\r\nPlease check the summary report at:\r\n\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/cfgtoollogs\/upgrade\/auto\/status\/status.html\r\n\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/cfgtoollogs\/upgrade\/auto\/status\/status.log<\/pre>\n<p>The last step is to stop the database and move all the database and configuration files (including datafiles, controlfiles, spfile, pwfile) and also the files generated by AutoUpgrade tool (<em>upgrade.cfg<\/em> and <em>\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/<\/em> folder) to the new server. Note again you won&#8217;t need this if you are upgrading to the same server.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ export ORACLE_SID=orcl\r\n[oracle@odbfcl-12-2-0-1 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 28 16:21:49 2021\r\n\r\nCopyright (c) 1982, 2016, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n\r\nSQL&gt; shut immediate;\r\nDatabase closed.\r\nDatabase dismounted.\r\nORACLE instance shut down.\r\n\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production<\/pre>\n<p>After everything is placed, I need to start up the database in 19c Oracle Home in upgrade mode:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-19-0-0-0 ~]$ export ORACLE_SID=orcl\r\n[oracle@odbfcl-19-0-0-0 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 19.0.0.0.0 - Production on Thu Oct 28 17:02:46 2021\r\nVersion 19.13.0.0.0\r\n\r\nCopyright (c) 1982, 2021, Oracle.  All rights reserved.\r\n\r\nConnected to an idle instance.\r\n\r\nSQL&gt; startup upgrade;\r\n\r\nORACLE instance started.\r\n\r\nTotal System Global Area 3154113392 bytes\r\nFixed Size\t\t    8901488 bytes\r\nVariable Size\t\t  687865856 bytes\r\nDatabase Buffers\t 2449473536 bytes\r\nRedo Buffers\t\t    7872512 bytes\r\nDatabase mounted.\r\nDatabase opened.\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\r\nVersion 19.13.0.0.0<\/pre>\n<p>And finally, I will call the <strong>upgrade<\/strong> phase of AutoUpgrade on the target machine:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-19-0-0-0 ~]$ $ORACLE_HOME\/jdk\/bin\/java -jar autoupgrade.jar -config .\/upgrade.cfg -mode upgrade\r\nAutoUpgrade 21.2.210721 launched with default options\r\nProcessing config file ...\r\n+--------------------------------+\r\n| Starting AutoUpgrade execution |\r\n+--------------------------------+\r\n1 databases will be processed\r\nType 'help' to list console commands\r\nupg&gt; lsj\r\n+----+-------+---------+---------+-------+--------------+--------+------------+\r\n|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|     MESSAGE|\r\n+----+-------+---------+---------+-------+--------------+--------+------------+\r\n| 103|   orcl|DBUPGRADE|EXECUTING|RUNNING|21\/10\/28 17:04|17:07:13|10%Upgraded |\r\n+----+-------+---------+---------+-------+--------------+--------+------------+\r\nTotal jobs 1\r\n\r\nupg&gt; Job 103 completed\r\n------------------- Final Summary --------------------\r\nNumber of databases            [ 1 ]\r\n\r\nJobs finished                  [1]\r\nJobs failed                    [0]\r\nJobs pending                   [0]\r\n\r\nPlease check the summary report at:\r\n\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/cfgtoollogs\/upgrade\/auto\/status\/status.html\r\n\/u01\/app\/oracle\/cfgtoollogs\/autoupgrade\/cfgtoollogs\/upgrade\/auto\/status\/status.log\r\n[oracle@odbfcl-19-0-0-0 ~]$<\/pre>\n<p>Now just checking if my database was really upgraded:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-19-0-0-0 ~]$ export ORACLE_SID=cdb19c\r\n[oracle@odbfcl-19-0-0-0 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 19.0.0.0.0 - Production on Thu Oct 28 18:02:44 2021\r\nVersion 19.13.0.0.0\r\n\r\nCopyright (c) 1982, 2021, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\r\nVersion 19.13.0.0.0\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n         4 PDB12C                         READ WRITE NO\r\n\r\nSQL&gt; alter session set container=PDB12C;\r\n\r\nSession altered.\r\n\r\nSQL&gt; select count(*) from TEST.T1;\r\n\r\n  COUNT(*)\r\n----------\r\n      2108\r\n\r\nSQL&gt; select cname, prv_version, version from registry$;\r\n\r\nCNAME                               PRV_VERSION                    VERSION\r\n----------------------------------- ------------------------------ ------------------------------\r\nOracle Database Catalog Views       12.2.0.1.0                     19.0.0.0.0\r\nOracle Database Packages and Types  12.2.0.1.0                     19.0.0.0.0\r\nOracle XML Database                 12.2.0.1.0                     19.0.0.0.0\r\nOracle Workspace Manager            12.2.0.1.0                     19.0.0.0.0\r\nJServer JAVA Virtual Machine        12.2.0.1.0                     19.0.0.0.0\r\nOracle XDK                          12.2.0.1.0                     19.0.0.0.0\r\nOracle Database Java Packages       12.2.0.1.0                     19.0.0.0.0\r\nOracle Text                         12.2.0.1.0                     19.0.0.0.0\r\nOracle Multimedia                   12.2.0.1.0                     19.0.0.0.0\r\nOLAP Analytic Workspace             12.2.0.1.0                     19.0.0.0.0\r\nOracle OLAP API                     12.2.0.1.0                     19.0.0.0.0\r\nSpatial                             12.2.0.1.0                     19.0.0.0.0\r\nOracle Label Security               12.2.0.1.0                     19.0.0.0.0\r\nOracle Database Vault               12.2.0.1.0                     19.0.0.0.0\r\nOracle Real Application Clusters    12.2.0.1.0                     19.0.0.0.0\r\n\r\n15 rows selected.\r\n\r\nSQL&gt; show parameter compatible\r\n\r\nNAME                                 TYPE        VALUE\r\n------------------------------------ ----------- ------------------------------\r\ncompatible                           string      12.2.0\r\nnoncdb_compatible                    boolean     FALSE<\/pre>\n<h4><span style=\"text-decoration: underline;\">Downgrade<\/span><\/h4>\n<p>Now that I&#8217;m on 19c, let&#8217;s imagine a fallback scenario. After running my production in this environment for some time, I want to move back to the original 12c database. I can&#8217;t simply restore a backup as I already had some production workload executed in this new database. So a downgrade is the only option I have.<\/p>\n<p>First, I will add a new table to my tablespace:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SQL&gt; alter session set container=PDB12C;\r\n\r\nSession altered.\r\n\r\nSQL&gt; create table test.t2 as select * from dba_tables;\r\n\r\nTable created.\r\n\r\nSQL&gt; select count(*) from test.t2;\r\n\r\n  COUNT(*)\r\n----------\r\n      2191\r\n\r\nSQL&gt;<\/pre>\n<p>Let&#8217;s start the downgrading process. I followed the <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/upgrd\/downgrading-oracle-db-after-upgrade.html#GUID-EAF290FD-5F22-4FEE-829D-B3587168471F\" target=\"_blank\" rel=\"noopener\">official documentation<\/a> but there is also a <a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocContentDisplay?id=2548962.1\" target=\"_blank\" rel=\"noopener\">MOS Note<\/a> for it.<\/p>\n<p>The overall steps are:<\/p>\n<ul>\n<li>Taking a backup of my PDB before starting.<\/li>\n<li>Cleaning out the UNIFIED_AUDIT_TRAIL on the PDB.<\/li>\n<li>Starting the PDB in downgrade mode.<\/li>\n<li>Calling PDB downgrade\n<ul>\n<li><strong>$ORACLE_HOME\/bin\/dbdowngrade -c &#8216;PDB12C&#8217;<br \/>\n<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Shut down and unplug the PDB from the 19c.<\/li>\n<li>Plug back the PDB on the 12c cdb fallback database.<\/li>\n<li>Run catrelod.sql<\/li>\n<\/ul>\n<p>First, I need to clean (or backup) the UNIFIED_AUDIT_TRAIL in that container:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-19-0-0-0 ~]$ export ORACLE_SID=cdb19c\r\n[oracle@odbfcl-19-0-0-0 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 19.0.0.0.0 - Production on Thu Oct 28 18:36:47 2021\r\nVersion 19.13.0.0.0\r\n\r\nCopyright (c) 1982, 2021, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\r\nVersion 19.13.0.0.0\r\n\r\nSQL&gt; alter session set container=PDB12C;\r\n\r\nSession altered.\r\n\r\nSQL&gt; select count(*) from UNIFIED_AUDIT_TRAIL;\r\n\r\n  COUNT(*)\r\n----------\r\n     26848\r\n\r\nSQL&gt; EXEC DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL(audit_trail_type =&gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED, use_last_arch_timestamp =&gt; FALSE);\r\n\r\nPL\/SQL procedure successfully completed.\r\n\r\nSQL&gt;<\/pre>\n<p>The next step is to start up the pluggable database in downgrade mode:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n         4 PDB12C                         READ WRITE YES\r\n\r\nSQL&gt; alter pluggable database PDB12C close;\r\n\r\nPluggable database altered.\r\n\r\nSQL&gt; alter pluggable database PDB12C open downgrade;\r\n\r\nPluggable database altered.\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n         4 PDB12C                         MIGRATE    YES<\/pre>\n<p>Finally, calling the <em><strong>$ORACLE_HOME\/bin\/dbdowngrade<\/strong><\/em> wrapper:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-19-0-0-0 ~]$ sh $ORACLE_HOME\/bin\/dbdowngrade -c 'PDB12C'\r\nDowngrading containers\r\ncatcon::set_log_file_base_path: ALL catcon-related output will be written to [\/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/cfgtoollogs\/downgrade\/catdwgrd_catcon_27280.lst]\r\n\r\ncatcon::set_log_file_base_path: catcon: See [\/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/cfgtoollogs\/downgrade\/catdwgrd*.log] files for output generated by scripts\r\n\r\ncatcon::set_log_file_base_path: catcon: See [\/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/cfgtoollogs\/downgrade\/catdwgrd_*.lst] files for spool files, if any\r\n\r\ncatcon.pl: completed successfully\r\n[oracle@odbfcl-19-0-0-0 ~]$ grep '^ORA-' \/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/cfgtoollogs\/downgrade\/catdwgrd*.log\r\n[oracle@odbfcl-19-0-0-0 ~]$<\/pre>\n<p>As you can see above. No errors were returned.<\/p>\n<p>Now, the next step is to unplug this PDB from 19c CDB and plug it back on a 12c CDB. As I&#8217;ve shown before, I&#8217;ve created a &#8220;fallback database&#8221; to hold it, as my original 12c database was in non-cdb architecture.<\/p>\n<p>Let&#8217;s unplug it:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-19-0-0-0 ~]$ export ORACLE_SID=cdb19c\r\n[oracle@odbfcl-19-0-0-0 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 19.0.0.0.0 - Production on Thu Oct 28 19:17:28 2021\r\nVersion 19.13.0.0.0\r\n\r\nCopyright (c) 1982, 2021, Oracle.  All rights reserved.\r\n\r\n\r\nConnected to:\r\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\r\nVersion 19.13.0.0.0\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n         4 PDB12C                         MIGRATE    YES\r\n\r\nSQL&gt; alter pluggable database PDB12C close immediate;\r\n\r\nPluggable database altered.\r\n\r\nSQL&gt; alter pluggable database PDB12C unplug into '\/home\/oracle\/PDB12C.unplug.xml';\r\n\r\nPluggable database altered.\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n         4 PDB12C                         MOUNTED\r\n\r\nSQL&gt; drop pluggable database PDB12C;\r\n\r\nPluggable database dropped.\r\n\r\nSQL&gt;<\/pre>\n<p>Now I move the XML file and all the datafiles to the source system. Remember this is not required if they reside on the same server. Finally, I will plug it back to the 12c CDB:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ export ORACLE_SID=cdb12c\r\n[oracle@odbfcl-12-2-0-1 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 28 19:28:50 2021\r\n\r\nCopyright (c) 1982, 2016, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n\r\nSQL&gt; create pluggable database PDB12C using '\/home\/oracle\/PDB12C.unplug.xml' nocopy;\r\n\r\nPluggable database created.\r\n\r\nSQL&gt; alter pluggable database PDB12C open upgrade;\r\n\r\nPluggable database altered.\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 PDB01                          READ WRITE NO\r\n         4 PDB12C                         MIGRATE    YES<\/pre>\n<p>And the last step is to run <em><strong>catrelod.sql<\/strong><\/em>, to recreate the database objects for the 12c version:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SQL&gt; alter session set container=PDB12C;\r\n\r\nSession altered.\r\n\r\nSQL&gt; set termout off\r\nSQL&gt; spool \/home\/oracle\/catrelod.log\r\nSQL&gt; @?\/rdbms\/admin\/catrelod.sql\r\n\r\nSQL&gt; spool off\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n[oracle@odbfcl-12-2-0-1 ~]$ grep '^ORA-' \/home\/oracle\/catrelod.log\r\n[oracle@odbfcl-12-2-0-1 ~]$<\/pre>\n<p>Now I&#8217;m with my CDB is back in 12c:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         4 PDB12C                         MIGRATE    YES\r\n\r\nSQL&gt; shut immediate;\r\nPluggable Database closed.\r\n\r\nSQL&gt; startup;\r\nPluggable Database opened.\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         4 PDB12C                         READ WRITE NO\r\n\r\nSQL&gt; select count(*) from TEST.T1;\r\n\r\n  COUNT(*)\r\n----------\r\n      2108\r\n\r\nSQL&gt; select count(*) from TEST.T2;\r\n\r\n  COUNT(*)\r\n----------\r\n      2191\r\n\r\nSQL&gt;<\/pre>\n<h4><span style=\"text-decoration: underline;\">Full Transportable Tablespace<\/span><\/h4>\n<p>Perfect. At this point, we are back to 12c, however not exactly as before as now we are in multitenant architecture. The next and final step, if I really want to fall back to the same scenario I was before, would be using TTS to move all my data back to the original system. Let&#8217;s try it:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ export ORACLE_SID=cdb12c\r\n[oracle@odbfcl-12-2-0-1 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 28 20:17:22 2021\r\n\r\nCopyright (c) 1982, 2016, Oracle.  All rights reserved.\r\n\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n\r\nSQL&gt; alter session set container=PDB12C;\r\n\r\nSession altered.\r\n\r\nSQL&gt; select tablespace_name from dba_tablespaces;\r\n\r\nTABLESPACE_NAME\r\n------------------------------\r\nSYSTEM\r\nSYSAUX\r\nUNDOTBS1\r\nTEMP\r\nUSERS\r\nTOOLS\r\n\r\n6 rows selected.\r\n\r\nSQL&gt; alter tablespace TOOLS read only;\r\n\r\nTablespace altered.\r\n\r\nSQL&gt; alter tablespace USERS read only;\r\n\r\nTablespace altered.\r\n\r\nSQL&gt;<\/pre>\n<p>I will also change the default tablespace of my dba &#8220;TEST&#8221; user from USER to SYSTEM as I will run expdp with it, and datapump needs to create some temporary tables:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SQL&gt; alter session set container=PDB12C;\r\n\r\nSession altered.\r\n\r\nSQL&gt; alter user test default tablespace system;\r\n\r\nUser altered.<\/pre>\n<p>Now calling expdp for transportable:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ expdp test\/oracle@localhost:1521\/pdb12c full=y transportable=always\r\n\r\nExport: Release 12.2.0.1.0 - Production on Fri Oct 29 11:21:31 2021\r\n\r\nCopyright (c) 1982, 2017, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nConnected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\nStarting \"TEST\".\"SYS_EXPORT_FULL_01\":  test\/********@localhost:1521\/pdb12c full=y transportable=always\r\nProcessing object type DATABASE_EXPORT\/EARLY_OPTIONS\/VIEWS_AS_TABLES\/TABLE_DATA\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/TABLE_DATA\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/VIEWS_AS_TABLES\/TABLE_DATA\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/TABLE_DATA\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/INDEX\/STATISTICS\/INDEX_STATISTICS\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/STATISTICS\/TABLE_STATISTICS\r\nProcessing object type DATABASE_EXPORT\/STATISTICS\/MARKER\r\nProcessing object type DATABASE_EXPORT\/PLUGTS_FULL\/FULL\/PLUGTS_TABLESPACE\r\nProcessing object type DATABASE_EXPORT\/PLUGTS_FULL\/PLUGTS_BLK\r\nProcessing object type DATABASE_EXPORT\/END_PLUGTS_BLK\r\nProcessing object type DATABASE_EXPORT\/PRE_SYSTEM_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/PRE_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/TABLESPACE\r\nProcessing object type DATABASE_EXPORT\/PROFILE\r\nProcessing object type DATABASE_EXPORT\/SYS_USER\/USER\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/USER\r\nProcessing object type DATABASE_EXPORT\/RADM_FPTM\r\nProcessing object type DATABASE_EXPORT\/GRANT\/SYSTEM_GRANT\/PROC_SYSTEM_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/GRANT\/SYSTEM_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/ROLE_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/DEFAULT_ROLE\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/ON_USER_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLESPACE_QUOTA\r\nProcessing object type DATABASE_EXPORT\/RESOURCE_COST\r\nProcessing object type DATABASE_EXPORT\/TRUSTED_DB_LINK\r\nProcessing object type DATABASE_EXPORT\/SYSTEM_PROCOBJACT\/PRE_SYSTEM_ACTIONS\/PROCACT_SYSTEM\r\nProcessing object type DATABASE_EXPORT\/SYSTEM_PROCOBJACT\/PROCOBJ\r\nProcessing object type DATABASE_EXPORT\/SYSTEM_PROCOBJACT\/POST_SYSTEM_ACTIONS\/PROCACT_SYSTEM\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/PROCACT_SCHEMA\r\nProcessing object type DATABASE_EXPORT\/EARLY_OPTIONS\/VIEWS_AS_TABLES\/TABLE\r\nProcessing object type DATABASE_EXPORT\/EARLY_POST_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/TABLE\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/VIEWS_AS_TABLES\/TABLE\r\nProcessing object type DATABASE_EXPORT\/NORMAL_POST_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/TABLE\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/COMMENT\r\nProcessing object type DATABASE_EXPORT\/XS_SECURITY\/SCHEMA\/XS_ACL\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/INDEX\/INDEX\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/CONSTRAINT\/CONSTRAINT\r\nProcessing object type DATABASE_EXPORT\/FINAL_POST_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/POST_SCHEMA\/PROCACT_SCHEMA\r\nProcessing object type DATABASE_EXPORT\/AUDIT_UNIFIED\/AUDIT_POLICY_ENABLE\r\nProcessing object type DATABASE_EXPORT\/POST_SYSTEM_IMPCALLOUT\/MARKER\r\n. . exported \"SYS\".\"KU$_USER_MAPPING_VIEW\"               6.078 KB      37 rows\r\n. . exported \"SYSTEM\".\"REDO_DB\"                          25.59 KB       1 rows\r\n. . exported \"ORDDATA\".\"ORDDCM_DOCS\"                     252.9 KB       9 rows\r\n. . exported \"WMSYS\".\"WM$WORKSPACES_TABLE$\"              12.10 KB       1 rows\r\n. . exported \"WMSYS\".\"WM$HINT_TABLE$\"                    9.984 KB      97 rows\r\n. . exported \"LBACSYS\".\"OLS$INSTALLATIONS\"               6.960 KB       2 rows\r\n. . exported \"WMSYS\".\"WM$WORKSPACE_PRIV_TABLE$\"          7.078 KB      11 rows\r\n. . exported \"SYS\".\"DAM_CONFIG_PARAM$\"                   6.531 KB      14 rows\r\n. . exported \"SYS\".\"TSDP_SUBPOL$\"                        6.328 KB       1 rows\r\n. . exported \"WMSYS\".\"WM$NEXTVER_TABLE$\"                 6.375 KB       1 rows\r\n. . exported \"LBACSYS\".\"OLS$PROPS\"                       6.234 KB       5 rows\r\n. . exported \"WMSYS\".\"WM$ENV_VARS$\"                      5.976 KB       2 rows\r\n. . exported \"SYS\".\"TSDP_PARAMETER$\"                     5.953 KB       1 rows\r\n. . exported \"SYS\".\"TSDP_POLICY$\"                        5.921 KB       1 rows\r\n. . exported \"WMSYS\".\"WM$VERSION_HIERARCHY_TABLE$\"       5.984 KB       1 rows\r\n. . exported \"WMSYS\".\"WM$EVENTS_INFO$\"                   5.812 KB      12 rows\r\n. . exported \"LBACSYS\".\"OLS$AUDIT_ACTIONS\"               5.757 KB       8 rows\r\n. . exported \"LBACSYS\".\"OLS$DIP_EVENTS\"                  5.539 KB       2 rows\r\n. . exported \"LBACSYS\".\"OLS$AUDIT\"                           0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$COMPARTMENTS\"                    0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$DIP_DEBUG\"                       0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$GROUPS\"                          0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$LAB\"                             0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$LEVELS\"                          0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$POL\"                             0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$POLICY_ADMIN\"                    0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$POLS\"                            0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$POLT\"                            0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$PROFILE\"                         0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$PROFILES\"                        0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$PROG\"                            0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$SESSINFO\"                        0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$USER\"                            0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$USER_COMPARTMENTS\"               0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$USER_GROUPS\"                     0 KB       0 rows\r\n. . exported \"LBACSYS\".\"OLS$USER_LEVELS\"                     0 KB       0 rows\r\n. . exported \"SYS\".\"AUD$\"                                23.75 KB       2 rows\r\n. . exported \"SYS\".\"DAM_CLEANUP_EVENTS$\"                     0 KB       0 rows\r\n. . exported \"SYS\".\"DAM_CLEANUP_JOBS$\"                       0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_ASSOCIATION$\"                       0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_CONDITION$\"                         0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_FEATURE_POLICY$\"                    0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_PROTECTION$\"                        0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_SENSITIVE_DATA$\"                    0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_SENSITIVE_TYPE$\"                    0 KB       0 rows\r\n. . exported \"SYS\".\"TSDP_SOURCE$\"                            0 KB       0 rows\r\n. . exported \"SYSTEM\".\"REDO_LOG\"                             0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$BATCH_COMPRESSIBLE_TABLES$\"         0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$CONSTRAINTS_TABLE$\"                 0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$CONS_COLUMNS$\"                      0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$LOCKROWS_INFO$\"                     0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$MODIFIED_TABLES$\"                   0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$MP_GRAPH_WORKSPACES_TABLE$\"         0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$MP_PARENT_WORKSPACES_TABLE$\"        0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$NESTED_COLUMNS_TABLE$\"              0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$RESOLVE_WORKSPACES_TABLE$\"          0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$RIC_LOCKING_TABLE$\"                 0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$RIC_TABLE$\"                         0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$RIC_TRIGGERS_TABLE$\"                0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$UDTRIG_DISPATCH_PROCS$\"             0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$UDTRIG_INFO$\"                       0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$VERSION_TABLE$\"                     0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$VT_ERRORS_TABLE$\"                   0 KB       0 rows\r\n. . exported \"WMSYS\".\"WM$WORKSPACE_SAVEPOINTS_TABLE$\"        0 KB       0 rows\r\n. . exported \"MDSYS\".\"RDF_PARAM$\"                        6.515 KB       3 rows\r\n. . exported \"SYS\".\"AUDTAB$TBS$FOR_EXPORT\"               5.960 KB       2 rows\r\n. . exported \"SYS\".\"DBA_SENSITIVE_DATA\"                      0 KB       0 rows\r\n. . exported \"SYS\".\"DBA_TSDP_POLICY_PROTECTION\"              0 KB       0 rows\r\n. . exported \"SYS\".\"FGA_LOG$FOR_EXPORT\"                      0 KB       0 rows\r\n. . exported \"SYS\".\"NACL$_ACE_EXP\"                           0 KB       0 rows\r\n. . exported \"SYS\".\"NACL$_HOST_EXP\"                      6.976 KB       2 rows\r\n. . exported \"SYS\".\"NACL$_WALLET_EXP\"                        0 KB       0 rows\r\n. . exported \"SYS\".\"SQL$TEXT_DATAPUMP\"                       0 KB       0 rows\r\n. . exported \"SYS\".\"SQL$_DATAPUMP\"                           0 KB       0 rows\r\n. . exported \"SYS\".\"SQLOBJ$AUXDATA_DATAPUMP\"                 0 KB       0 rows\r\n. . exported \"SYS\".\"SQLOBJ$DATA_DATAPUMP\"                    0 KB       0 rows\r\n. . exported \"SYS\".\"SQLOBJ$PLAN_DATAPUMP\"                    0 KB       0 rows\r\n. . exported \"SYS\".\"SQLOBJ$_DATAPUMP\"                        0 KB       0 rows\r\n. . exported \"SYSTEM\".\"SCHEDULER_JOB_ARGS\"                   0 KB       0 rows\r\n. . exported \"SYSTEM\".\"SCHEDULER_PROGRAM_ARGS\"           9.515 KB      12 rows\r\n. . exported \"WMSYS\".\"WM$EXP_MAP\"                        7.718 KB       3 rows\r\n. . exported \"WMSYS\".\"WM$METADATA_MAP\"                       0 KB       0 rows\r\nMaster table \"TEST\".\"SYS_EXPORT_FULL_01\" successfully loaded\/unloaded\r\n******************************************************************************\r\nDump file set for TEST.SYS_EXPORT_FULL_01 is:\r\n  \/u01\/app\/oracle\/admin\/cdb12c\/dpdump\/CF6972DD148B3675E0531201000A270A\/expdat.dmp\r\n******************************************************************************\r\nDatafiles required for transportable tablespace TOOLS:\r\n  \/u01\/app\/oracle\/oradata\/CDB12C\/orcl\/tools01.dbf\r\nDatafiles required for transportable tablespace USERS:\r\n  \/u01\/app\/oracle\/oradata\/CDB12C\/orcl\/users01.dbf\r\nJob \"TEST\".\"SYS_EXPORT_FULL_01\" successfully completed at Fri Oct 29 11:23:19 2021 elapsed 0 00:01:46\r\n\r\n[oracle@odbfcl-12-2-0-1 ~]$<\/pre>\n<p>Now, finally, I will import the data back to a non-cdb 12c. I don&#8217;t recommend you to use the original one as the target database here. Instead, create a new empty in non-cdb mode. That way, you won&#8217;t have any conflict with existing objects and you can even compare later with the original for any difference.<\/p>\n<p>As the USERS tablespace already exists on a out-of-box database, I will just rename it to USERS_OLD to avoid conflict on the FTTS import.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ export ORACLE_SID=orcl\r\n[oracle@odbfcl-12-2-0-1 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 29 11:42:53 2021\r\n\r\nCopyright (c) 1982, 2016, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n\r\nSQL&gt; alter tablespace USERS rename to USERS_OLD;\r\n\r\nTablespace altered.\r\n\r\nSQL&gt; alter database move datafile '\/u01\/app\/oracle\/oradata\/orcl\/users01.dbf' to '\/u01\/app\/oracle\/oradata\/orcl\/users01_old.dbf';\r\n\r\nDatabase altered.<\/pre>\n<p>I will position the datafiles and the dump file created by the expdp ftts process in the location I want.<\/p>\n<p>Calling now the impdp:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ export ORACLE_SID=orcl\r\n[oracle@odbfcl-12-2-0-1 ~]$ cp -av \/u01\/app\/oracle\/admin\/cdb12c\/dpdump\/CF6972DD148B3675E0531201000A270A\/expdat.dmp \/u01\/app\/oracle\/admin\/orcl\/dpdump\/expdat.dmp\r\n'\/u01\/app\/oracle\/admin\/cdb12c\/dpdump\/CF6972DD148B3675E0531201000A270A\/expdat.dmp' -&gt; '\/u01\/app\/oracle\/admin\/orcl\/dpdump\/expdat.dmp'\r\n[oracle@odbfcl-12-2-0-1 ~]$ impdp \\\"\/ as sysdba\\\" transport_datafiles=\/u01\/app\/oracle\/oradata\/orcl\/tools01.dbf,\/u01\/app\/oracle\/oradata\/orcl\/users01.dbf\r\n\r\nImport: Release 12.2.0.1.0 - Production on Fri Oct 29 16:26:22 2021\r\n\r\nCopyright (c) 1982, 2017, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nConnected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\nMaster table \"SYS\".\"SYS_IMPORT_TRANSPORTABLE_01\" successfully loaded\/unloaded\r\nStarting \"SYS\".\"SYS_IMPORT_TRANSPORTABLE_01\":  \"\/******** AS SYSDBA\" transport_datafiles=\/u01\/app\/oracle\/oradata\/orcl\/tools01.dbf,\/u01\/app\/oracle\/oradata\/orcl\/users01.dbf\r\nProcessing object type DATABASE_EXPORT\/PRE_SYSTEM_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/PRE_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/PLUGTS_FULL\/PLUGTS_BLK\r\nProcessing object type DATABASE_EXPORT\/TABLESPACE\r\nORA-31684: Object type TABLESPACE:\"UNDOTBS1\" already exists\r\n\r\nORA-31684: Object type TABLESPACE:\"TEMP\" already exists\r\n\r\nProcessing object type DATABASE_EXPORT\/PROFILE\r\nProcessing object type DATABASE_EXPORT\/SYS_USER\/USER\r\nORA-31685: Object type USER:\"SYS\" failed due to insufficient privileges. Failing sql is:\r\n ALTER USER \"SYS\" IDENTIFIED BY VALUES 'S:                                                            ;T:                                                                                                                                                                ' TEMPORARY TABLESPACE \"TEMP\"\r\n\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/USER\r\nProcessing object type DATABASE_EXPORT\/RADM_FPTM\r\nProcessing object type DATABASE_EXPORT\/GRANT\/SYSTEM_GRANT\/PROC_SYSTEM_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/GRANT\/SYSTEM_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/ROLE_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/DEFAULT_ROLE\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/ON_USER_GRANT\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLESPACE_QUOTA\r\nProcessing object type DATABASE_EXPORT\/RESOURCE_COST\r\nProcessing object type DATABASE_EXPORT\/TRUSTED_DB_LINK\r\nProcessing object type DATABASE_EXPORT\/SYSTEM_PROCOBJACT\/PRE_SYSTEM_ACTIONS\/PROCACT_SYSTEM\r\n&gt;&gt;&gt; Cannot set an SCN larger than the current SCN. If a Streams Capture configuration was imported then the Apply that processes the captured messages needs to be dropped and recreated. See My Oracle Support article number 1380295.1.\r\nProcessing object type DATABASE_EXPORT\/SYSTEM_PROCOBJACT\/PROCOBJ\r\nORA-39083: Object type PROCOBJ:\"SYS\".\"XMLDB_NFS_JOBCLASS\" failed to create with error:\r\nORA-27477: \"SYS\".\"XMLDB_NFS_JOBCLASS\" already exists\r\n\r\nFailing sql is:\r\nBEGIN\r\ndbms_scheduler.create_job_class('\"XMLDB_NFS_JOBCLASS\"',NULL,NULL,128,NULL,\r\nNULL\r\n);COMMIT; END;\r\n\r\nProcessing object type DATABASE_EXPORT\/SYSTEM_PROCOBJACT\/POST_SYSTEM_ACTIONS\/PROCACT_SYSTEM\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/PROCACT_SCHEMA\r\nProcessing object type DATABASE_EXPORT\/EARLY_OPTIONS\/VIEWS_AS_TABLES\/TABLE\r\nProcessing object type DATABASE_EXPORT\/EARLY_OPTIONS\/VIEWS_AS_TABLES\/TABLE_DATA\r\n. . imported \"SYS\".\"KU$_EXPORT_USER_MAP\"                 6.054 KB      36 rows\r\nProcessing object type DATABASE_EXPORT\/EARLY_POST_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/TABLE\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/TABLE_DATA\r\n. . imported \"SYSTEM\".\"REDO_DB_TMP\"                      25.59 KB       1 rows\r\n. . imported \"ORDDATA\".\"ORDDCM_DOCS_TRANSIENT\"           252.9 KB       9 rows\r\n. . imported \"WMSYS\".\"E$WORKSPACES_TABLE$\"               12.10 KB       1 rows\r\n. . imported \"WMSYS\".\"E$HINT_TABLE$\"                     9.984 KB      97 rows\r\n. . imported \"WMSYS\".\"E$WORKSPACE_PRIV_TABLE$\"           7.078 KB      11 rows\r\n. . imported \"SYS\".\"AMGT$DP$DAM_CONFIG_PARAM$\"           6.531 KB      14 rows\r\n. . imported \"SYS\".\"DP$TSDP_SUBPOL$\"                     6.328 KB       1 rows\r\n. . imported \"WMSYS\".\"E$NEXTVER_TABLE$\"                  6.375 KB       1 rows\r\n. . imported \"WMSYS\".\"E$ENV_VARS$\"                       5.976 KB       2 rows\r\n. . imported \"SYS\".\"DP$TSDP_PARAMETER$\"                  5.953 KB       1 rows\r\n. . imported \"SYS\".\"DP$TSDP_POLICY$\"                     5.921 KB       1 rows\r\n. . imported \"WMSYS\".\"E$VERSION_HIERARCHY_TABLE$\"        5.984 KB       1 rows\r\n. . imported \"WMSYS\".\"E$EVENTS_INFO$\"                    5.812 KB      12 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$AUDIT\"                    0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$COMPARTMENTS\"             0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$GROUPS\"                   0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$LAB\"                      0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$LEVELS\"                   0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$POL\"                      0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$POLS\"                     0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$POLT\"                     0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$PROFILE\"                  0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$PROG\"                     0 KB       0 rows\r\n. . imported \"LBACSYS\".\"OLS_DP$OLS$USER\"                     0 KB       0 rows\r\n. . imported \"SYS\".\"AMGT$DP$AUD$\"                        25.03 KB      11 rows\r\n. . imported \"SYS\".\"AMGT$DP$DAM_CLEANUP_EVENTS$\"             0 KB       0 rows\r\n. . imported \"SYS\".\"AMGT$DP$DAM_CLEANUP_JOBS$\"               0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_ASSOCIATION$\"                    0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_CONDITION$\"                      0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_FEATURE_POLICY$\"                 0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_PROTECTION$\"                     0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_SENSITIVE_DATA$\"                 0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_SENSITIVE_TYPE$\"                 0 KB       0 rows\r\n. . imported \"SYS\".\"DP$TSDP_SOURCE$\"                         0 KB       0 rows\r\n. . imported \"SYSTEM\".\"REDO_LOG_TMP\"                         0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$BATCH_COMPRESSIBLE_TABLES$\"          0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$CONSTRAINTS_TABLE$\"                  0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$CONS_COLUMNS$\"                       0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$LOCKROWS_INFO$\"                      0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$MODIFIED_TABLES$\"                    0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$MP_GRAPH_WORKSPACES_TABLE$\"          0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$MP_PARENT_WORKSPACES_TABLE$\"         0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$NESTED_COLUMNS_TABLE$\"               0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$RESOLVE_WORKSPACES_TABLE$\"           0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$RIC_LOCKING_TABLE$\"                  0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$RIC_TABLE$\"                          0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$RIC_TRIGGERS_TABLE$\"                 0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$UDTRIG_DISPATCH_PROCS$\"              0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$UDTRIG_INFO$\"                        0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$VERSION_TABLE$\"                      0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$VT_ERRORS_TABLE$\"                    0 KB       0 rows\r\n. . imported \"WMSYS\".\"E$WORKSPACE_SAVEPOINTS_TABLE$\"         0 KB       0 rows\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/VIEWS_AS_TABLES\/TABLE\r\nProcessing object type DATABASE_EXPORT\/NORMAL_OPTIONS\/VIEWS_AS_TABLES\/TABLE_DATA\r\n. . imported \"MDSYS\".\"RDF_PARAM$TBL\"                     6.515 KB       3 rows\r\n. . imported \"SYS\".\"AMGT$DP$AUDTAB$TBS$FOR_EXPORT\"       5.960 KB       2 rows\r\n. . imported \"SYS\".\"DP$DBA_SENSITIVE_DATA\"                   0 KB       0 rows\r\n. . imported \"SYS\".\"DP$DBA_TSDP_POLICY_PROTECTION\"           0 KB       0 rows\r\n. . imported \"SYS\".\"AMGT$DP$FGA_LOG$FOR_EXPORT\"              0 KB       0 rows\r\n. . imported \"SYS\".\"NACL$_ACE_IMP\"                           0 KB       0 rows\r\n. . imported \"SYS\".\"NACL$_HOST_IMP\"                      6.976 KB       2 rows\r\n. . imported \"SYS\".\"NACL$_WALLET_IMP\"                        0 KB       0 rows\r\n. . imported \"SYS\".\"DATAPUMP$SQL$TEXT\"                       0 KB       0 rows\r\n. . imported \"SYS\".\"DATAPUMP$SQL$\"                           0 KB       0 rows\r\n. . imported \"SYS\".\"DATAPUMP$SQLOBJ$AUXDATA\"                 0 KB       0 rows\r\n. . imported \"SYS\".\"DATAPUMP$SQLOBJ$DATA\"                    0 KB       0 rows\r\n. . imported \"SYS\".\"DATAPUMP$SQLOBJ$PLAN\"                    0 KB       0 rows\r\n. . imported \"SYS\".\"DATAPUMP$SQLOBJ$\"                        0 KB       0 rows\r\n. . imported \"SYSTEM\".\"SCHEDULER_JOB_ARGS_TMP\"               0 KB       0 rows\r\n. . imported \"SYSTEM\".\"SCHEDULER_PROGRAM_ARGS_TMP\"       9.515 KB      12 rows\r\n. . imported \"WMSYS\".\"E$EXP_MAP\"                         7.718 KB       3 rows\r\n. . imported \"WMSYS\".\"E$METADATA_MAP\"                        0 KB       0 rows\r\nProcessing object type DATABASE_EXPORT\/NORMAL_POST_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/TABLE\r\nProcessing object type DATABASE_EXPORT\/XS_SECURITY\/SCHEMA\/XS_ACL\r\nORA-39083: Object type XS_ACL:\"SYS\".\"NETWORK_ACL_CF6973C1EF8236DEE0531201000A24BE\" failed to create with error:\r\nORA-46212: XS entity with this name already exists.\r\n\r\nFailing sql is:\r\n\r\nDECLARE\r\n ace_list      XS$ACE_LIST;\r\nBEGIN\r\n ace_list := XS$ACE_LIST(\r\n   XS$ACE_TYPE(\r\n     privilege_list =&gt; XS$NAME_LIST('\"RESOLVE\"'),\r\n     principal_name=&gt;'\"ORACLE_OCM\"',\r\n     principal_type=&gt;XS_ACL.PTYPE_DB));\r\n\r\n xs_acl.create_acl(\r\n     name=&gt;'\"SYS\".\"NETWORK_ACL_CF6973C1EF8236DEE0531201000A24BE\"',\r\n     ace_list=&gt;ace_list,\r\n     sec_class=&gt;'\"SYS\".\"NETWORK_SC\"',\r\n     description=&gt;'OCM User Resolve Network Access using UTL_INADDR');\r\nEND;\r\n\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/TABLE\/STATISTICS\/TABLE_STATISTICS\r\nProcessing object type DATABASE_EXPORT\/STATISTICS\/MARKER\r\nProcessing object type DATABASE_EXPORT\/END_PLUGTS_BLK\r\nProcessing object type DATABASE_EXPORT\/FINAL_POST_INSTANCE_IMPCALLOUT\/MARKER\r\nProcessing object type DATABASE_EXPORT\/SCHEMA\/POST_SCHEMA\/PROCACT_SCHEMA\r\nProcessing object type DATABASE_EXPORT\/AUDIT_UNIFIED\/AUDIT_POLICY_ENABLE\r\nProcessing object type DATABASE_EXPORT\/POST_SYSTEM_IMPCALLOUT\/MARKER\r\nJob \"SYS\".\"SYS_IMPORT_TRANSPORTABLE_01\" completed with 5 error(s) at Fri Oct 29 16:27:19 2021 elapsed 0 00:00:55<\/pre>\n<p>I got 5 errors, but in this case that can be safely ignored as they are related to objects that already exist.<\/p>\n<p>Now checking my tables:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[oracle@odbfcl-12-2-0-1 ~]$ export ORACLE_SID=orcl\r\n[oracle@odbfcl-12-2-0-1 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 29 16:31:43 2021\r\n\r\nCopyright (c) 1982, 2016, Oracle.  All rights reserved.\r\n\r\nConnected to:\r\nOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production\r\n\r\nSQL&gt; select count(*) from test.t1;\r\n\r\n  COUNT(*)\r\n----------\r\n      2108\r\n\r\nSQL&gt; select count(*) from test.t2;\r\n\r\n  COUNT(*)\r\n----------\r\n      2191\r\n\r\nSQL&gt;<\/pre>\n<p>And that&#8217;s it! As you can see, there is no mystery about moving forward and back from 19c PDB to 12.2 NON-CDB.<\/p>\n<p>Don&#8217;t forget to always try the full upgrade\/downgrade process in a &#8220;prod like&#8221; environment before.<\/p>\n<b>Have you enjoyed? Please leave a comment or give a ?!<\/b>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style2 like-14741 jlk' href='javascript:void(0)' data-task='like' data-post_id='14741' data-nonce='b7aaf4ff99' rel='nofollow'><img class='wti-pixel' src='https:\/\/dev.dbarj.com.br\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-14741 lc'>+10<\/span><\/a><\/div><\/div> <div class='status-14741 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Today my experiment will be upgrading 12.2 (Oct 2021 RU &amp; OJVM), running in the non-CDB mode, to the latest 19c version (currently it is 19.13) in multitenant architecture. The idea of this scenario is to validate and test not only the upgrade process but especially the downgrade strategy. I will keep the COMPATIBLE parameter &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-14741","post","type-post","status-publish","format-standard","hentry","category-database-en","item-wrap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB - DBA - Rodrigo Jorge - Oracle Tips and Guides<\/title>\n<meta name=\"description\" content=\"In this article, I describe the steps to upgrade an Oracle Database from 12.2 to 19c and also how can you roll it back.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DBA RJ\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/\"},\"author\":{\"name\":\"DBA RJ\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"headline\":\"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB\",\"datePublished\":\"2021-11-01T19:17:11+00:00\",\"dateModified\":\"2021-11-04T14:13:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/\"},\"wordCount\":1062,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"image\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/img_617a923b0d2d8.png\",\"articleSection\":[\"Oracle Database General\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/\",\"url\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/\",\"name\":\"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB - DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/img_617a923b0d2d8.png\",\"datePublished\":\"2021-11-01T19:17:11+00:00\",\"dateModified\":\"2021-11-04T14:13:59+00:00\",\"description\":\"In this article, I describe the steps to upgrade an Oracle Database from 12.2 to 19c and also how can you roll it back.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#primaryimage\",\"url\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/img_617a923b0d2d8.png\",\"contentUrl\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/img_617a923b0d2d8.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/2021\\\/11\\\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/\",\"name\":\"DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"description\":\"Blog about Databases, Security and High Availability\",\"publisher\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\",\"name\":\"DBA RJ\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"url\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"contentUrl\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"width\":712,\"height\":712,\"caption\":\"DBA RJ\"},\"logo\":{\"@id\":\"https:\\\/\\\/dev.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB - DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"In this article, I describe the steps to upgrade an Oracle Database from 12.2 to 19c and also how can you roll it back.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/","twitter_misc":{"Written by":"DBA RJ","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#article","isPartOf":{"@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/"},"author":{"name":"DBA RJ","@id":"https:\/\/dev.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"headline":"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB","datePublished":"2021-11-01T19:17:11+00:00","dateModified":"2021-11-04T14:13:59+00:00","mainEntityOfPage":{"@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/"},"wordCount":1062,"commentCount":2,"publisher":{"@id":"https:\/\/dev.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"image":{"@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#primaryimage"},"thumbnailUrl":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8.png","articleSection":["Oracle Database General"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/","url":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/","name":"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB - DBA - Rodrigo Jorge - Oracle Tips and Guides","isPartOf":{"@id":"https:\/\/dev.dbarj.com.br\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#primaryimage"},"image":{"@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#primaryimage"},"thumbnailUrl":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8.png","datePublished":"2021-11-01T19:17:11+00:00","dateModified":"2021-11-04T14:13:59+00:00","description":"In this article, I describe the steps to upgrade an Oracle Database from 12.2 to 19c and also how can you roll it back.","breadcrumb":{"@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#primaryimage","url":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8.png","contentUrl":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2021\/10\/img_617a923b0d2d8.png"},{"@type":"BreadcrumbList","@id":"https:\/\/dev.dbarj.com.br\/en\/2021\/11\/how-to-upgrade-and-downgrade-oracle-database-12-2-non-cdb-to-19c-cdb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dev.dbarj.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"How to upgrade and downgrade Oracle Database 12.2 non-CDB to 19c CDB"}]},{"@type":"WebSite","@id":"https:\/\/dev.dbarj.com.br\/en\/#website","url":"https:\/\/dev.dbarj.com.br\/en\/","name":"DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"Blog about Databases, Security and High Availability","publisher":{"@id":"https:\/\/dev.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dev.dbarj.com.br\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/dev.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9","name":"DBA RJ","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","url":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","contentUrl":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","width":712,"height":712,"caption":"DBA RJ"},"logo":{"@id":"https:\/\/dev.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png"}}]}},"_links":{"self":[{"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/14741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/comments?post=14741"}],"version-history":[{"count":5,"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/14741\/revisions"}],"predecessor-version":[{"id":14764,"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/14741\/revisions\/14764"}],"wp:attachment":[{"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/media?parent=14741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/categories?post=14741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.dbarj.com.br\/en\/wp-json\/wp\/v2\/tags?post=14741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}