ORASOLU TOOLBOX · MIGRATION

Migration Diagnostics

Practical Oracle SQL for post-migration database status, invalid objects, compilation errors, constraints and storage readiness.

ORASOLU TOOLBOX · MIGRATION

Check the database after the move

Post-migration diagnostics should establish evidence that the target database is ready for use. These queries provide a practical starting point for reviewing database status, invalid objects, compilation errors, constraints and storage readiness.

01 · DATABASE STATUS

Review database status

Confirm the target database instance and database status before deeper validation.

SELECT
    name,
    open_mode,
    database_role,
    log_mode
FROM v$database;
02 · INVALID OBJECTS

Find invalid objects

Identify invalid objects that may require recompilation or application review.

SELECT
    owner,
    object_type,
    COUNT(*) AS invalid_count
FROM dba_objects
WHERE status = 'INVALID'
GROUP BY owner, object_type
ORDER BY owner, object_type;
03 · INVALID INDEXES

Review invalid indexes

Identify indexes that are not currently valid in the migrated database.

SELECT
    owner,
    index_name,
    table_name,
    status
FROM dba_indexes
WHERE status <> 'VALID'
ORDER BY owner, index_name;
04 · INVALID PL/SQL

Review compilation errors

Review stored PL/SQL compilation errors requiring investigation.

SELECT
    owner,
    name,
    type,
    line,
    position,
    text
FROM dba_errors
ORDER BY owner, name, sequence;
05 · CONSTRAINTS

Review constraint status

Identify constraints that are disabled and may affect application validation.

SELECT
    owner,
    constraint_name,
    table_name,
    constraint_type,
    status
FROM dba_constraints
WHERE status <> 'ENABLED'
ORDER BY owner, table_name, constraint_name;
06 · STORAGE

Review tablespace usage

Review tablespace allocation and free space as part of post-migration readiness.

SELECT
    tablespace_name,
    ROUND(used_percent, 2) AS used_percent
FROM dba_tablespace_usage_metrics
ORDER BY used_percent DESC;