TL/DR;
New Command: MIGRATEADVISOR (MA)

Docs and Demo
We have an entire chapter in the SQLcl docs to help you get started with this new command, complete with examples.
Of course there’s help built-in for the command as well.

Capture ‘properties’ of your Target Instance
If you are migrating to an existing Oracle Database in the Cloud, you can connect with SQLcl, and capture a snapshot of it’s properties.
Connecting to Autonomous is as easy as downloading the Wallet (zip) and doing a CONNECT.

Once you’re connected, use the ma command with the properties option.

-p is short for -outfileprefix, and is tacked onto the beginning of the report file(s).
If we peak into this .properties file, we can see what’s being recorded for our upcoming ‘advise’ command –

Running Advise on your local database
With a highly privileged account, such as ‘SYSTEM’, you can now connect to the database you’ll be migrating one or more schemas off of, and generate your reports.

ma advise -t ATPS -analysisprops ATP-TJS-19c_premigration_advisor_analysis.properties
-t is short for -targettype, which can be {ATPS|ATPD|ADWS|ADWD|DEFAULT}. Default just means, any ole Oracle Database. ‘ATPS’ means, an Oracle Autonomous Shared Transaction Processing instance.
I could use the -s, or -schemas flag to specify EXACTLY which schemas we want to analyze. But I didn’t, so the report looks at EVERYTHING sans the system maintained schemas.
The report comes back with a quick summary of what was found, and tells you about the reports generated.
My 33 schemas took about 25-30 seconds for SQLcl to chunk through.
The HTML Report

We can see on the report what the source system is, and we even record the ‘ma’ command used to generate the report.
If I click into one of the detail items, I get more info –

Note that we include the SQL behind the report, so you can run it yourself to see what’s what…
Here’s the SQL used to find Objects that are in ‘Custom’ tablespaces. When I run my Data Pump import job, I’ll need to remap the tablespaces to the ‘Data’ one you get in Autonomous.

Isn’t this just the CPAT Utility?
Yes. It is in fact just the Cloud Premigration Advisor Tool (CPAT.) You can still download that from the Support portal (Doc ID 2758371.1), assuming you have an account in good standing. But now, it’s officially part of SQLcl, and will get updates as needed on a regular basis. And of course we try to make things as easy as possible for you, so here we are.
The post Oracle SQLcl version 22.2 is now available first appeared on ThatJeffSmith.