Skip to content
Menu
Alex Zaballa – Oracle Tips and Guides
  • Home
  • About
Alex Zaballa – Oracle Tips and Guides
July 14, 2025September 26, 2025

CPAT – How to Use a Parameter File

As I mentioned in my previous post about CPAT enhancements, we have extended the existing CPAT functionality to support the use of a parameter file.
For example, if you have many databases to analyze, or if you prefer not to list all the options directly on the command line, using a parameter file becomes especially useful.

The parameter file can be something like:

#Global Parameters
global.keystore=/home/oracle/cpat/wallet
global.targetcloud=ATPS
global.reportformat=json,text,html
global.full=true
global.migrationmethod=DATAPUMP
global.analysisprops=/home/oracle/cpat/premigration_advisor_analysis.prop
global.username=SYSTEM
global.gatherdetails=ALL

#Database 23.6.0
db1.outdir=/home/oracle/cpat/premigration/db1
db1.gatherdetails=ALL
db1.connectstring=jdbc:oracle:thin:@dbsystemaz:1521/pdbaz

#Database 19.27.0
db2.outdir=/home/oracle/cpat/premigration/db2
db2.gatherdetails=NONE
db2.connectstring=jdbc:oracle:thin:@dbsystemaz:1521/pdb1

As you can see, there are Global parameters and Namespaces.

  • The Namespace can be anything—for example: A, B, C, or DB1, DB2, DB3, etc.
  • Global parameters define the default values that apply to all databases.
  • Inside a Namespace, you can specify database-specific parameters or override the global parameters as needed.

You can run CPAT by passing the parameter file:

premigration.sh -parfile param.cfg

You will see an interactive mode like this:

You can run the report analysis using the following command:

run db1
or 
run all

It will prompt you for the password of each database:

Then, CPAT starts running:

After a few seconds, the process is complete:

You can view the generated files in the folder specified in the configuration file:

If you carefully review the parameter file, you’ll see the following:

global.keystore=/home/oracle/cpat/wallet

It points to a wallet, which can be used to securely store the username and password. When configured this way, the tool won’t prompt for credentials during execution.
Alternatively, you can use OS authentication to run CPAT, in which case no username or password is required.

To load the passwords, use the --loadpassword option

premigration.sh -parfile param.cfg --loadpassword

This will create a wallet, secured with a password:

I can add the username and password for the db1:

When using this option, CPAT connects to the database to verify that the username and password are valid.
If needed, you can bypass this verification by using the -nocheck option.

At this point, you need to interact with the tool; however, you can run it without any interaction by using the --noconsole option.
Remember to generate an autologin wallet; otherwise, you’ll need to enter the wallet password manually.

premigration.sh -parfile param.cfg --noconsole

Stay tuned for more exciting new features!

Links to the Complete Blog Post Series about CPAT:

  • FAQ
  • Part 1 – Starting with CPAT
  • Part 2 – Options for Running CPAT
  • Part 3 – Running CPAT
  • Part 4 – Troubleshooting CPAT
  • Part 5 – CPAT Checks
  • Part 6 – CPAT New Features – December 2024
  • Part 7 – Cloud Premigration Advisor Tool (CPAT) Composer
  • Part 8 – CPAT New Features – June 2025
  • Part 9 – CPAT – How to Use a Parameter File
  • Part 10 – CPAT New Features – September 2025
©2025 Alex Zaballa – Oracle Tips and Guides | Powered by WordPress and Superb Themes!