In case you missed part 1 and part 2.
Gather target properties – Fetch Target Instance Properties for Use in Source Instance Analysis
If the target environment already exists, a helpful approach is to create a properties file from the target database and utilize it to make a more precise evaluation of the source database. CPAT will consider the actual values of specific attributes, including the TimeZone version, Tablespaces, Parameters, Installed Options, etc.
Using CPAT with a properties file generated from the target instance is strongly recommended.
Certain properties of the target database instance are required to perform the most complete analysis possible of the source database instance. The “--gettargetprops
” parameter is intended to be used with the other connection-related parameters to perform this function.
premigration.sh --gettargetprops -username ADMIN --connectstring 'jdbc:oracle:thin:@<service-name>?TNS_ADMIN=<path-to-wallet>'
The command above generates a premigration_advisor_analysis.properties file to be used when analyzing a source instance.
If necessary the properties file should be copied to the host where analysis of the source database will be done and supplied to CPAT using the “--analysisprops
” parameter.
If you are planning to migrate to Autonomous Database, you need to get the wallet:
After downloading it you can copy the wallet file to the machine executing CPAT and extract the zip file.
unzip Wallet_fusionappsdb02aut.zip
Archive: Wallet_fusionappsdb02aut.zip
inflating: ewallet.pem
inflating: README
inflating: cwallet.sso
inflating: tnsnames.ora
inflating: truststore.jks
inflating: ojdbc.properties
inflating: sqlnet.ora
inflating: ewallet.p12
inflating: keystore.jks
Check the file tnsnames.ora to get the appropriate service name:
You can use any service since CPAT is doing only read-only operations and nothing resource-intensive.
premigration.sh --gettargetprops -username ADMIN --connectstring 'jdbc:oracle:thin:@fusionappsdb02aut_high?TNS_ADMIN=/tmp/cpat'
Enter password for ADMIN user:
Cloud Premigration Advisor Tool Version 24.9.0
Cloud Premigration Advisor Tool generated properties file location: /tmp/cpat/premigration_advisor_analysis.properties
You can open the file to check what is collected, for example:
TargetInstanceProp.DB_BLOCK_SIZE=8192
TargetInstanceProp.DB_PLATFORM_ID=13
TargetInstanceProp.DB_TIME_ZONE=+00\:00
TargetInstanceProp.DB_VERSION=19.25.0.1.0
TargetInstanceProp.DIRECTORIES=DATA_PUMP_DIR
TargetInstanceProp.NLS_CHARACTERSET=AL32UTF8
TargetInstanceProp.NLS_NCHAR_CHARACTERSET=AL16UTF16
TargetInstanceProp.PDB_LOCKDOWN=OLTP
TargetInstanceProp.TABLESPACES=DATA,DBFS_DATA,SAMPLESCHEMA,SYSAUX,SYSTEM,TEMP,UNDOTBS1,UNDO_8,UNDO_9
TargetInstanceProp.TABLESPACE_BLOCK_SIZE.DATA=8192
- If all your target instances are basically the same, you can re-use the properties file
- If you’re an expert it’s OK to tweak the values in the properties file to suit your needs
- But generally, the properties file contents are considered opaque, and Oracle reserves the right to add/remove properties as needed
Using OS Authentication:
premigration.sh --connectstring jdbc:oracle:oci:@ --sysdba --analysisprops premigration_advisor_analysis.properties --targetcloud ATPS --pdbname=FUSION_PDB
Or using a thin driver:
premigration.sh --connectstring jdbc:oracle:thin:@db01:1521/fusion_pdb --sysdba --username SYS --analysisprops premigration_advisor_analysis.properties --targetcloud ATPS
You can get more examples of connection strings in part 2.
Opening the HTML result file:
As you can see, we need to take some actions before migrating.
Also, since we don’t specify the migration method, it’s using the default one (Datapump).
While CPAT primarily focuses on migrating to an Autonomous Database, it can also be used to evaluate the feasibility of migrating to other destinations such as DBCS, ExaCS, ExaCC, etc. Generate a properties file pointing to one of these environments and later use the “--targetcloud default
“.
Keep reports from being overwritten
Use the “--outfileprefix
” and “--outdir
” parameters to keep things straight and to keep reports from being overwritten.
CMA
You can also use CPAT results for CMA – Cloud Migration Advisor. In this case, you have two options, adding the parameter “--reportformat JSON
” or you can run the script cma.sh or cma.cmd available in the CPAT bin directory.
AWS RDS
Yes, it’s possible to run CPAT on your AWS RDS Oracle Database instance.
Here, you can find a blog post about it.
Stay tuned for the next post.