Independent senior database engineering · Pittsburgh, PAsbajwa@bajwaconsulting.com

Oracle migration readiness check

Moving Oracle to PostgreSQL, AWS or OCI? Answer a few questions about size, code, features and downtime. Get a complexity score, the migration approach that fits, and the risks to plan for.

1 From and to

2 Code and application

3 Features in use

Tick everything the database uses. If unsure, query DBA_FEATURE_USAGE_STATISTICS and DBA_OBJECTS (see the queries at the end).

Measure before you plan: queries to run on the source

-- Size by schema (GB)
SELECT owner, ROUND(SUM(bytes)/1024/1024/1024, 1) gb FROM dba_segments
GROUP BY owner ORDER BY 2 DESC;

-- Objects and lines of PL/SQL in application schemas
SELECT o.owner, o.object_type, COUNT(*) objects FROM dba_objects o
JOIN dba_users u ON u.username = o.owner AND u.oracle_maintained = 'N'
GROUP BY o.owner, o.object_type ORDER BY 1, 3 DESC;

SELECT s.owner, COUNT(*) plsql_lines FROM dba_source s
JOIN dba_users u ON u.username = s.owner AND u.oracle_maintained = 'N'
GROUP BY s.owner ORDER BY 2 DESC;

-- Database links and features in use
SELECT owner, db_link, host FROM dba_db_links;
SELECT name, detected_usages FROM dba_feature_usage_statistics
WHERE detected_usages > 0 ORDER BY name;

More checks (invalid objects, character set, scheduler jobs) are in the free DBA scripts library.

Planning an Oracle migration?

A short assessment of the real schema, code and workload turns this score into a plan with a timeline, a cut-over runbook and a fallback.

Oracle → PostgreSQL migration