We read and listen to your comments. And that’s why my team mate Byron has added a new preupgrade.jar and changes to MOS Note:884522.1. One reader commented that MOS Note:884522.1 (How to Download and Run Oracle’s Database Pre-Upgrade Utility) does not explain how to “run” the preupgrade tool even though it mentions this in the note’s title.
New preupgrade.jar and changes in MOS Note:884522.1
With MOS Note:884522.1 you can download always the most recent versions of the Oracle 18c and 12.2 preupgrade.jar tools, of the Oracle 12.1.0.2 preupgrd.sql and utluppkg.sql. And you’ll even find the last utlu112i.sql for upgrades to Oracle 11.2.0.4.
You should always download the most recent version of the preupgrade tool for your database version from MOS Note:884522.1. The version you get with a patch set or base release is usually much older than the version you can download as the installed default version has been built before a code freeze date. But the version available on MOS gets updated usually every other month.
New and improved instructions
Based on customer’s feedback Byron has adjusted the instructions to make it more clear on how to use each tool – and added links to the respective documentation pages. This way you’ll find now the correct information on how to use the tool for each version.
Download Instructions
See the table in MOS Note:884522.1 to determine which version of the pre-upgrade script you need. It will depend on which version you are upgrading from, and which version you are upgrading to.
For upgrade-to version 12.1.*, save the zipfile to a directory that will be accessible when you connect to your upgrade-from database and then unzip the file.
If the upgrade-to version is 12.2 or higher, then save the file to your target $ORACLE_HOME/rdbms/admin directory and then unzip the file. It could be your source or target $ORACLE_HOME.
And finally, for upgrade-to version 11.2.0.4 or earlier, copy all of the download files to some directory that will be accessible when you connect to your upgrade-from database.
Script Execution Steps
To execute the preupgrade tool itself, see the Database Upgrade Guide for your upgrade-to version:
- 11.2. databases see: Upgrade guide to 11.2
- 12.1 databases see: Upgrade guide to 12.1
- 12.2 databases see: Upgrade guide to 12.2
- 18c database see: Upgrade guide to 18c
Further Information
For a complete list of preupgrade checks execute by each tool see:
–Mike
Helo Mike,
I’m confused: I HAVE TO unzip the zip file in 12.2 ORACLE_HOME ( so I have to have 12.2 OH installed)
or (from doc 12.2 databases see: Upgrade guide to 12.2 ) I “can also copy the preupgrade.jar binaries to a path of your choosing. For example: /tmp/preupgrade.jar” – and I don’t need 12.2 binaries installed
I it is important because we want to check db 2-3 weeks before upgrade and plan to install binaries is 1 week before upgrade.
Thank you,
Leszek
Leszek,
Byron changed the note’s content overnight again. You – of course – don’t need a 12.2 or whatever home on your source. It will work with your old home’s JAVA installation and you can copy and unzip it anywhere. I adjust the blog post to match with the note’s recent changes.
For convenience reasons I would unzip it into the ?/rdbms/admin of your source – makes life easier.
Sorry for the confusion!
Cheers,
Mike
Mike,
Does the latest preupgrade.jar work for upgrade to 18c?
Is there a MOS note identifying manual upgrade checklist to 18c (like MOS note 2173141.1 or is this note good enough for 18c)?
Is there any documentation on what checks the preupgrade.jar performs? I am going through the manual upgrade checklist MOS Note 2173141.1 and there are many checks. For example, does preupgrade.jar check for materialized views?
Thanks,
Arun
Hi Arun
(1) preupgrade.jar:
https://mikedietrichde.com/2018/03/19/oracle-database-18c-new-preupgrade-jar-available/
(2) Manual checklist:
Oracle DB 18c – Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 18c (Doc ID 2418045.1)
But it is not published yet – I believe it will be published with the availability of the on-prem release in a few days.
(3) Checks of preupgrade.jar:
https://mikedietrichde.com/2018/04/24/list-of-preupgrade-checks-executed-by-preupgrade-jar/
Cheers,
Mike
Hi
preupgrade fail if a PDB is open in Read Only even if this PDB is not included in the “-c” argument. Looks like the script runs on all PDBs and ignore the -C.
$ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/12.2.0.1/db_1/rdbms/admin/preupgrade.jar TERMINAL TEXT -C ‘PDB2’
File: dir_preUpgrade_catCon1.log Line: 73 –> error: ORA-16000: database or pluggable database open for read-only access
File: dir_preUpgrade_catCon1.log Line: 74 –> error: ORA-06512: at line 1
ERROR – Unable to run the preupgrade due to: please see the log files for further information.
Ned,
please try:
java -jar $OH18/rdbms/admin/preupgrade.jar -C “PDB2” TEXT TERMINAL
I tried it in your order as well – and it still works for me.
I use it against an 12.1.0.2 database with 3 PDBs, one opened read-only, the others read-write.
If that does not work for you, could you try the Oracle 18c preupgrade.jar please?
Thanks and sorry for the inconvenience!
Mike
PS: This is from my CDB:
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> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ ONLY NO
5 PDB3 READ WRITE NO
Hi Mike,
The 18c preupgrade.jar work if there is a Read Only PDB, but the script still runs for all PDBs (including PDB$SEED, it re-open it in RW) even when we use -C arg.
It takes long time when there are over 200 PDBs in the CDB.
Can it be changed to run for 1 PDB?
Thanks
Ned
Ned,
of course this possible – see here:
https://mikedietrichde.com/2018/04/05/unplug-a-12-2-0-1-pdb-and-plugin-into-18c-in-the-cloud/
Keyword is: java -jar ./preupgrade.jar -c ‘PDB12201’ TEXT TERMINAL
Cheers,
Mike
Hi Mike,
I’m about to do an upgrade from 10.2.0.3 (AIX) to 12.2.0.1 (Linux) Using Data Pump.
The MOS note in this article does not mention running the preupgrade.jar on a 10.2 database when upgrading to 12.2.
Can I still use the script?
Best regards,
Frank
Frank,
of course you always can. But Data Pump migrates the database – hence, preupgrade tells you something about the current state and future things and does not harm. But it is not necessary for a migration.
Cheers,
Mike
Hi,
I tried and it refused to run complaining about an unsupported version.
Best regards,
Frank
Frank, this is true . sorry . it will run only on upgrade-supported versions. And the minimum will be 11.2.0.3.
Thanks and sorry for the confusion!
Mike
On several of my 12.2 databases, I cant get the java script to run. It just hangs. Anyone hit this ? or can suggest what to do??? 12.2 has jan 2020 psu installed.
Hi Denise,
then please log an SR as there are multiple reasons why nothing happens. Support needs to figure this out.
Thanks and sorry for the inconvenience,
Mike