Thursday, 2 July 2026

How to Gather Schema Statistics for the APEX

You can gather statistics for the Apex (Oracle Application Express) schema. However, in an Oracle E-Business Suite (EBS) environment, you must use standard DBMS_STATS procedures instead of the EBS-specific FND_STATS wrapper for non-EBS schemas.

Recommended Steps to Gather Stats

Check Schema Statistics

This query gives you a quick overview of the total number of tables, indexes, and how many of them have missing or stale statistics.

SELECT
    owner,
    COUNT(*) as total_tables,
    SUM(CASE WHEN last_analyzed IS NULL THEN 1 ELSE 0 END) as missing_stats,
    MIN(last_analyzed) as oldest_stats,
    MAX(last_analyzed) as newest_stats
FROM dba_tables
WHERE owner = 'APEX_SCHEMA'
GROUP BY owner;

Gather Schema Statistics

You can gather these statistics directly using the DBMS_STATS package while connected as the SYS or SYSTEM user via SQL*Plus or SQL Developer.

Run the following PL/SQL block in your database:

BEGIN
  DBMS_STATS.GATHER_SCHEMA_STATS (
    ownname          => 'APEX_SCHEMA',---like APEX_200200
    estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
    method_opt       => 'FOR ALL COLUMNS SIZE AUTO',
    cascade          => TRUE,
    degree           => DBMS_STATS.AUTO_DEGREE
  );
END;
/

Gather Fixed Object Statistics (If performance is slow globally)

If APEX is running slow globally across the database, also consider ensuring your fixed objects have fresh stats:

EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

Best Practices & Warnings for EBS

Do NOT use FND_STATS: EBS-specific wrappers (like FND_STATS.GATHER_SCHEMA_STATS) check for EBS specific metadata dictionary tables. Using them on the APEX schema may fail or corrupt standard executions. Use native DBMS_STATS instead.

Backup: If you are unsure about the impact, you can create a stats table to export the current APEX statistics first using DBMS_STATS.CREATE_STAT_TABLE and DBMS_STATS.EXPORT_SCHEMA_STATS, allowing you to roll back if necessary.

Here is the precise SQL script to backup your APEX_SCHEMA statistics and rollback them if you encounter performance issues.

Run these steps as the SYS or SYSTEM user.

Create the Backup Table

Create a dedicated table to hold the current statistics. You can place this in a system schema or a custom DBA schema (e.g., SYSTEM).

EXEC DBMS_STATS.CREATE_STAT_TABLE(ownname => 'SYSTEM', stattab => 'APEX_STATS_BKP');

Export the Current Statistics

Export the existing statistics of the APEX schema into your newly created backup table.

BEGIN

  DBMS_STATS.EXPORT_SCHEMA_STATS (
    ownname => 'APEX_SCHEMA',---like APEX_200200
    stattab => 'APEX_STATS_BKP',
    statown => 'SYSTEM'
  );
END;
/

Gather Schema Statistics Run the following PL/SQL block in your database:


BEGIN
  DBMS_STATS.GATHER_SCHEMA_STATS (
    ownname          => 'APEX_SCHEMA',---like APEX_200200
    estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
    method_opt       => 'FOR ALL COLUMNS SIZE AUTO',
    cascade          => TRUE,
    degree           => DBMS_STATS.AUTO_DEGREE
  );
END;
/

How to Roll Back (Only if needed)

If queries slow down after gathering new stats, restore the original metadata from your backup table:

BEGIN
  DBMS_STATS.IMPORT_SCHEMA_STATS (
    ownname => 'APEX_SCHEMA',---like APEX_200200
    stattab => 'APEX_STATS_BKP',
    statown => 'SYSTEM'
  );
END;
/

Clean Up

Once you verify that the new statistics work well and performance is stable, drop the backup table:

EXEC DBMS_STATS.DROP_STAT_TABLE(ownname => 'SYSTEM', stattab => 'APEX_STATS_BKP');

You can check when statistics were last gathered for the APEX_SCHEMA schema by querying the data dictionary views.

Run these scripts as a user with DBA privileges (like SYS or SYSTEM).

Check Schema-Level Summary

This query gives you a quick overview of the total number of tables, indexes, and how many of them have missing or stale statistics.

SELECT
    owner,
    COUNT(*) as total_tables,
    SUM(CASE WHEN last_analyzed IS NULL THEN 1 ELSE 0 END) as missing_stats,
    MIN(last_analyzed) as oldest_stats,
    MAX(last_analyzed) as newest_stats
FROM dba_tables
WHERE owner = 'APEX_SCHEMA'
GROUP BY owner;

Check Specific Tables and Row Counts

This query shows the exact date and time statistics were last gathered for every table in the APEX schema, sorted from newest to oldest.

SELECT
    table_name,
    num_rows,
    blocks,
    TO_CHAR(last_analyzed, 'YYYY-MM-DD HH24:MI:SS') AS last_gathered,
    stale_stats
FROM dba_tab_statistics
WHERE owner = 'APEX_SCHEMA'
ORDER BY last_analyzed DESC;

What to Look For
STALE_STATS = YES: The data has changed significantly since the last gather, and Oracle considers these stats outdated.
LAST_ANALYZED IS NULL: Statistics have never been gathered for this object.

Delete statistics completely for a specific table

To remove statistics completely for a specific table in the APEX_SCHEMA schema, you use the DBMS_STATS.DELETE_TABLE_STATS procedure. This immediately clears out the table, column, and index metadata, forcing the Oracle Cost-Based Optimizer (CBO) to use its built-in dynamic sampling or internal default cards for that table.

Run this script as a user with DBA privileges (such as SYS or SYSTEM).

The Script to Delete Table Statistics

BEGIN
  DBMS_STATS.DELETE_TABLE_STATS (
    ownname   => 'APEX_SCHEMA',
    tabname   => 'YOUR_TABLE_NAME',
    cascade_parts => TRUE,  -- Deletes partition-level statistics if applicable
    cascade_columns => TRUE, -- Deletes associated column statistics/histograms
    cascade_indexes => TRUE  -- Deletes all associated index statistics
  );
END;
/

Verify the Statistics are Gone

After running the deletion block, execute this query to confirm that the metadata has been purged. The statistics columns should now return empty (NULL).

SELECT
    table_name,
    num_rows,
    blocks,
    last_analyzed
FROM dba_tables
WHERE owner = 'APEX_SCHEMA'
  AND table_name = 'YOUR_TABLE_NAME';

A Crucial Next Step

If you delete statistics because they were causing a bad execution plan, you must lock the table immediately after deletion. If you leave it unlocked, Oracle’s automatic nightly maintenance job will automatically gather fresh statistics again, undoing your deletion.

Lock the statistics

Locking statistics prevents the automatic nightly maintenance job or accidental manual runs from overwriting your preferred, stable statistics.

Run these commands as a user with DBA privileges (such as SYS or SYSTEM).

Lock Statistics for the Entire Schema

To lock the statistics for every table and index inside the APEX_SCHEMA schema, use the following command:

EXEC DBMS_STATS.LOCK_SCHEMA_STATS(ownname => 'APEX_SCHEMA');

Verify the Lock Status

You can verify that the statistics are successfully locked by checking the STATTYPE_LOCKED column in the data dictionary. If it returns ALL, the statistics are locked.

SELECT table_name, stattype_locked FROM dba_tab_statistics
WHERE owner = 'APEX_SCHEMA';

How to Unlock Statistics (If you need to update them later)

If you patch APEX, perform a large data load, or decide it is time to gather new statistics, you must unlock the schema first:

EXEC DBMS_STATS.UNLOCK_SCHEMA_STATS(ownname => 'APEX_SCHEMA');

Alternative: Lock a Single Specific Table

If you only want to freeze statistics for a specific problematic table instead of the whole schema, use these table-level commands:

-- Lock a single table

EXEC DBMS_STATS.LOCK_TABLE_STATS(ownname => 'APEX_SCHEMA', tabname => 'YOUR_TABLE_NAME');

-- Unlock a single table

EXEC DBMS_STATS.UNLOCK_TABLE_STATS(ownname => 'APEX_SCHEMA', tabname => 'YOUR_TABLE_NAME');

Automatically gather statistics ONLY on stale tables

You can identify tables with stale statistics automatically by querying Oracle's data dictionary views or by using a PL/SQL block that utilizes the DBMS_STATS package.

The fastest way to view all stale or missing statistics for the APEX_SCHEMA schema is to query DBA_TAB_STATISTICS.

SELECT
    table_name,
    num_rows,
    TO_CHAR(last_analyzed, 'YYYY-MM-DD HH24:MI:SS') AS last_gathered,
    stale_stats
FROM dba_tab_statistics
WHERE owner = 'APEX_SCHEMA'
  AND (stale_stats = 'YES' OR last_analyzed IS NULL)
ORDER BY table_name;

STALE_STATS = YES: Means data changes have crossed the 10% threshold.
LAST_ANALYZED IS NULL: Means statistics are missing completely.

The Automated PL/SQL Script

This script flushes the latest database monitoring information to ensure accurate tracking data, then automatically gathers statistics only on the stale or unanalyzed objects within the APEX_SCHEMA schema.

BEGIN
--Step1:Force Oracle to flush the latest row modification tracking data to disk
 DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;
 
--Step2:Gather stats ONLY on stale or missing tables
  DBMS_STATS.GATHER_SCHEMA_STATS (
    ownname          => 'APEX_SCHEMA',
    options          => 'GATHER STALE',  -- Crucial option: skips non-stale tables
    estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
    method_opt       => 'FOR ALL COLUMNS SIZE AUTO',
    cascade          => TRUE,
    degree           => DBMS_STATS.AUTO_DEGREE
  );
END;
/

Alternative: "GATHER EMPTY"

If you are worried about performance and only want to populate statistics for tables that have never been analyzed before (completely missing stats), change the option parameter:

options  => 'GATHER EMPTY'-- Processes only tables with NULL statistics

Why use GATHER STALE?

Saves Time: It drastically cuts down script runtime by avoiding large, unchanged tables.
Reduces I/O Overhead: It prevents unnecessary disk reads and CPU usage on your EBS database container.
Maintains Performance: It updates query execution plans only where major data shifts have actually occurred. 

Tuesday, 30 June 2026

Re-Creating Appsutil Directory for DB Tier in Oracle EBS R12 (Step-by-Step)

Oracle E-Business Suite (EBS) R12 relies heavily on AutoConfig to maintain configuration consistency between the Application Tier and Database Tier.

Prerequisites

Ensure:

  • You have access to both Application Tier and Database Tier
  • You know the APPS password (for context file generation)
  • You have valid environment sourced on both tiers

Recreating the appsutil directory on the Database Tier is commonly required when:

  • Database ORACLE_HOME is replaced or corrupted.
  • AutoConfig files are missing.
  • Database host, port, SID, or DB name changes.
  • Database upgrade or migration (e.g., 11g → 19c).
  • Cloning activities.
  • AutoConfig fails because the appsutil directory is incomplete.

Step 1: On Application Tier

Source the Application Environment

$ . $APPL_TOP/APPSSID_hostname.env

Step 2: Run AutoConfig on Application Tier

$ sh $ADMIN_SCRIPTS_HOME/adautocfg.sh

Verify AutoConfig completes successfully before proceeding.

Step 3: Generate appsutil.zip using admkappsutil.pl

$ perl $AD_TOP/bin/admkappsutil.pl

Starting the generation of appsutil.zip

Log file:

$INST_TOP/admin/log/MakeAppsUtil_xxxxx.log

Output:

$INST_TOP/admin/out/appsutil.zip

MakeAppsUtil completed successfully.

The generated file will be located at:

$INST_TOP/admin/out/appsutil.zip

Step 4: Source Database ORACLE_HOME Environment

source $ORACLE_HOME/SID_hostname.env

Step 5: Copy appsutil.zip to Database Tier

$ scp $INST_TOP/admin/out/appsutil.zip  oracle@<DB_SERVER_IP>:$ORACLE_HOME/

or use FTP/WinSCP if preferred.

Step 6: Backup Existing appsutil

Always take a backup.

$ cd $ORACLE_HOME

$ mv appsutil appsutil_backup_$(date +%F)

If only refreshing:

$ cp -rp appsutil appsutil_bkp

Step 7: Unzip appsutil.zip under $ORACLE_HOME

$ cd $ORACLE_HOME

$ unzip -o appsutil.zip

You should now have:

$ORACLE_HOME/appsutil

Step 8: Generate Database Context File

$ cd $ORACLE_HOME/appsutil/bin

$ perl adbldxml.pl

or

$ perl adbldxml.pl appsuser/pwd

It will ask for:

APPS password
Database hostname
Listener port
SID

A new context file is created:

$ORACLE_HOME/appsutil/<CONTEXT_NAME>.xml

This step is required because the unzipped Appsutil directory does not initially contain the scripts directory.

Step 9: Create scripts Directory

$ cd $ORACLE_HOME/appsutil/bin

$ sh adconfig.sh contextfile=$ORACLE_HOME/appsutil/<CONTEXT_NAME>.xml

This creates:

$ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>/

Step 10: Run AutoConfig on the Database Tier

$ cd $ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>

$ sh adautocfg.sh

Enter the APPS password
Successful completion should display:
AutoConfig completed successfully.

Step 11: Verify

Verify the scripts directory exists:

ls -lrt $ORACLE_HOME/appsutil/scripts

Verify the context file:

ls $ORACLE_HOME/appsutil/*.xml

Check the AutoConfig log:

$ORACLE_HOME/appsutil/log

or

$ORACLE_HOME/appsutil/scripts/<CONTEXT_NAME>/<timestamp>/adconfig.log

Directory Structure After Recreation

$ORACLE_HOME

├── appsutil
│   ├── admin
│   ├── bin
│   ├── driver
│   ├── install
│   ├── log
│   ├── scripts
│   │      └── <CONTEXT_NAME>
│   │              ├── adautocfg.sh
│   │              ├── addbctl.sh
│   │              ├── addlnctl.sh
│   │              └── ...
│   ├── template
│   └── <CONTEXT_NAME>.xml

Enabling audit trail for Oracle E-Business Suite Application in R12.1.x/R12.2.x

Audit is a very important feature of the oracle apps. We can track the last changes in the Oracle apps records but what about the second last change so well there is no track of this. So to see all the changes that happened for the table we can use the Audit feature of the oracle apps. We can audit some of the sensitive tables in oracle apps R12 using audit trail functionality. We don't need to audit the complete table. We can audit the Complete or we can audit some of the columns in the table and the Audit report will give us all the details regarding any changes in this table for that audit columns.

You can choose to store and retrieve a history of all changes users make on a given table. Auditing is accomplished using audit groups, which functionally registered Oracle IDs or group tables to be audited. For a table to be audited, it must be included in an enabled audit group.

Audit Trail Groups are groups of tables and columns. You do not necessarily need to include all the columns in a given table. You enable auditing for audit groups rather than for individual tables. You would typically group together those tables that belong to the same business process (for example, purchase order tables).

A given table can belong to more than one audit group. If so, the table is audited according to the highest level of enabling for any of its groups, where Enabled is the highest, followed by Disable Dump Data, Disable No Growth, and Disable Purge Table, in that order.

You can enable auditing for a maximum of 240 columns for a given table, and you can enable auditing for all types of table columns except LONG, RAW, or LONG RAW. Your audit group must include all columns that make up the primary key for a table; these columns are added to your audit group automatically. Once you have added a column to an audit group, you cannot remove it.

Turn on Audit Trail.

Turn on Oracle E-Business Suite Applications Audit Trail by setting the system profile Audit Trail: Activate to Yes

System Administrator ==> Profile ==>System

Find the Profile 'AuditTrail:Activate' and set this to Yes at Site Level.


Identify which table we want to audit and which column of this table. Then need to identify the Module of the Audit table to which that Table belongs.
 
Install the Audit Trail

System Administrator ==> Security ==>AuditTrail ==>Install
 
Select the Module to which we want to Install the Audit Trail.


Create the Table Audit Group.
 
System Administrator ==> Security ==>AuditTrail ==>Groups

Create the Audit Group for table 'AP_INVOICES_ALL'
 

Note: When you first create the audit group the group status will be 'Enable Requested' this will automatically be changed to 'Enabled' once the AuditTrail Update Tables concurrent request is run

Enable Audit Columns 

System Administrator ==> Security ==>AuditTrail ==>Tables

Now we need to set the Audit on the Table and the column to which we want to keep track.


Now we will run the concurrent Program in System Administrator responsibility "AuditTrail report for Audit Group Validation".

After the given above concurrent program run successfully then we will run the concurrent Program in System Administrator responsibility "AuditTrail Update Tables'.

Confirm the Audit tables would be created with (_A) name. These are also called shadow Tables

Error:
While running AuditTrail Update Tables concurrent request on e-business suite R12 as part of audittrail enable process the request completed with Fatal error in fdasql, quitting.... Fatal error in fdacv, quitting.... Fatal error in fdaupc, quitting error.

Metalink note
AuditTrail Update Tables fails on View AP_SYSTEM_PARAMETERS_ALL_AC1 (Doc ID 727208.1)

Solution
1. Navigate to the audit group tables, and query back the table as before
2. Set the Group state to "Disable - Purge Table" for AP_SYSTEM_PARAMETERS_ALL. This option
Disable - Purge Table Drops the auditing triggers and views and deletes all data from the shadow
table.


3. Run the "AuditTrail Update Tables" concurrent program

Monday, 22 June 2026

Setup ora2pg for Oracle to Postgres Migration

An important part of performing a migration from Oracle to PostgreSQL is selecting the right tool for helping with the conversion between systems. ora2pg a powerful open source utility.

ora2pg is a tool that migrates Oracle or MySQL databases to PostgreSQL by generating compatible SQL files As the documentation states, ora2pg “connects your Oracle database, scans it automatically and extracts its structure or data, it then generates SQL scripts that you can load into your PostgreSQL database.”

Below Steps Required for Setup ora2pg and Configuration:
  1. Install necessary prerequisites
  2. Build and install DBD::Oracle
  3. Build and install ora2pg
  4. Install the Oracle Instant Client SDK
  5. Configure ora2pg
  6. Test and use ora2pg
Prerequisite
  1. Install wget, perl, DBI (database interface module), DBD::Oracle and DBD::Pg
  2. Download the latest version of ora2pg
Step 1: Install Required Package and it's dependency

# yum install -y wget perl perl-DBI perl-DBD-Pg perl-Time-HiRes make gcc 
# yum install -y perl-core perl-devel

Step 2: Download the ora2pg

# wget https://github.com/darold/ora2pg/archive/refs/tags/v24.3.tar.gz

--2026-03-31 15:31:03--  https://github.com/darold/ora2pg/archive/refs/tags/v24.3.tar.gz
Resolving github.com (github.com)... 20.207.73.82
Connecting to github.com (github.com)|20.207.73.82|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/darold/ora2pg/tar.gz/refs/tags/v24.3 [following]
--2026-03-31 15:31:09--  https://codeload.github.com/darold/ora2pg/tar.gz/refs/tags/v24.3
Resolving codeload.github.com (codeload.github.com)... 20.207.73.88
Connecting to codeload.github.com (codeload.github.com)|20.207.73.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v24.3.tar.gz’
[ <=> ] 576,965 1.34MB/s   in 0.4s

2026-03-31 15:31:10 (1.34 MB/s) - ‘v24.3.tar.gz’ saved [576965]

Step 3: Check file Downloaded or not and after that untar 

# ll
total 7408
-rwxrwxrwx 1 oracle oracle   12668 Jun 28  2025 crontabs-1.11-6.20121102git.el7.noarch.rpm
-rwxrwxrwx 1 oracle oracle    3169 Sep  8  2025 RPM-GPG-KEY-oracle-ol8
-rwxrwxrwx 1 oracle oracle  576965 Mar 31 15:31 v24.3.tar.gz

# tar -xvf v24.3.tar.gz

Step 4: Install Postgres Software

# cd ora2pg-24.3/

# ll
total 644
-rwxrwxrwx 1 oracle oracle 374342 Mar 29  2024 changelog
drwxrwxrwx 1 oracle oracle    512 Mar 29  2024 doc
-rwxrwxrwx 1 oracle oracle     21 Mar 29  2024 INSTALL
drwxrwxrwx 1 oracle oracle    512 Mar 29  2024 lib
-rwxrwxrwx 1 oracle oracle  32472 Mar 29  2024 LICENSE
-rwxrwxrwx 1 oracle oracle  75191 Mar 29  2024 Makefile.PL
-rwxrwxrwx 1 oracle oracle    180 Mar 29  2024 MANIFEST
drwxrwxrwx 1 oracle oracle    512 Mar 29  2024 packaging
-rwxrwxrwx 1 oracle oracle 171271 Mar 29  2024 README
drwxrwxrwx 1 oracle oracle    512 Mar 29  2024 scripts

# perl Makefile.PL
which: no bzip2 in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:..........)
Checking if your kit is complete...
Looks good
Writing Makefile for Ora2Pg
Writing MYMETA.yml and MYMETA.json

Done...
------------------------------------------------------------------------------
Please read documentation at http://ora2pg.darold.net/ before asking for help
------------------------------------------------------------------------------
Now type: make && make install

# make && make install
# make install
                                    OR
# make && make install

Step 5: Check Postgres Software version

# ora2pg -v
Ora2Pg v24.3

Step 6: Download & Install Oracle Instant Client SDK

# yum install -y /path/to/oracle-instantclient*.rpm

You will need to include the below in your ~/.bash_profile:

$ vi ~/.bash_profile:
# InstantClient
export ORACLE_HOME=/opt/oracle/instantclient_23_26
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PAT
export PATH=$ORACLE_HOME/bin:$PATH
Then source the new env vars by running

$ source ~/.bash_profile

You will then test the connection to your Oracle server (if you've installed the sqlplus instantclient package simply run the below):

$ sqlplus user/pwd@//IP:1521/ORCLPDB1
 
Configure ora2pg

After you have ora2pg built and installed you can now configure the ora2pg.conf to work with your Oracle server. The settings that you see below are the settings in my environment. The ora2pg.conf file has many configuration settings that you can change. Below are the configuration changes that you will need to apply to your ora2pg.conf in order to be able to use ora2pg. Please keep in mind that you will need to change the settings to match your environment.

Edit config:

$vi /etc/ora2pg/ora2pg.conf

# Set the Oracle home directory
ORACLE_HOME     /opt/oracle/instantclient_23_26

#Connection Details (Oracle Source)
ORACLE_DSN      dbi:Oracle:host=hostname;port=1521;sid=ORCL
ORACLE_USER     user
ORACLE_PWD      password

#Migration Scope
#Oracle schema/owner to use
SCHEMA          APPS

#EXPORT SECTION (Export type and filters)
TYPE            TABLE
ALLOW           XX_.*

#Performance Settings
PARALLEL_TABLES 2
JOBS            2
ROWS            50000
PREFETCH        10000
CASE_SENSITIVE  0
USE_DBA         0
DATA_LIMIT 1
FILE_PER_TABLE 1
SPLIT_LIMIT 10M

# Export Oracle schema to PostgreSQL schema
EXPORT_SCHEMA   1
EXPORT_TABLES   1
EXPORT_INDEXES  0
EXPORT_CONSTRAINTS 0
EXPORT_TRIGGERS 0

#Data Type Handling
#TYPE SECTION (Control type behaviors and redefinitions)
PG_VERSION      11
PG_NUMERIC_TYPE 1
DEFAULT_NUMERIC numeric

#Disabled Objects
#OBJECT MODIFICATION SECTION (Control objects structure or name modifications)
DISABLE_PARTITION 1
DISABLE_TRIGGERS 1
DISABLE_SEQUENCE 1
DISABLE_PACKAGE   1
DISABLE_FUNCTION  1
DISABLE_PROCEDURE 1

#Parsing & Metadata
PLSQL_PARSING   0
ORACLE_METADATA 0

#Other Flags
DIRECT          1
LOOK_FORWARD_FUNCTION 0
NO_FULL_SCHEMA  1

Testing ora2pg

Now that ora2pg has been configured you can finally test connectivity. By testing the connectivity you will see that you have configured ora2pg correctly, if you didn’t you will receive errors. You can test by running the below command:

$ ora2pg -t SHOW_VERSION -c config/ora2pg.conf

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
  
Note: Here we used 'estimate_cost' is to activate the migration cost evaluation with SHOW_REPORT
 
$ ora2pg -t show_report  --estimate_cost -c config/ora2pg.conf --dump_as_html > /tmp/ora2pg/ora2pgtestreport.html
 
-------------------------------------------------------------------------------
Ora2Pg v24.3 - Database Migration Report
-------------------------------------------------------------------------------
Version  Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
Schema   APPS
Size     90.36 MB