Download

Release Notes/Readme

TL/DR;

New Command: MIGRATEADVISOR (MA)

MA for short, checks your database for potential problems before data pumping to the Cloud.

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.

There’s basically two modes, ‘advise’ and ‘properties.’

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.

set cloudconfig & show tns are your friends

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

By default we’ll write to the local directory.

-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 –

Now we know that our Autonomous Database is running with a Timezone file version of 36.

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.

‘hr’ is god on my local instance of Oracle.
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

I clicked into the ‘Review Required’ section for the rules that were tripped.

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 –

If your application uses these objects, you need to code around that before migrating.

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.

Ew that SQL is ugly, if only there were a formatter…

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.

thatjeffsmith
Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

Write A Comment

RSS
Follow by Email
LinkedIn
Share