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;ORASOLU TOOLBOX · MIGRATION
Practical Oracle SQL for post-migration database status, invalid objects, compilation errors, constraints and storage readiness.
ORASOLU TOOLBOX · MIGRATION
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.
Confirm the target database instance and database status before deeper validation.
SELECT
name,
open_mode,
database_role,
log_mode
FROM v$database;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;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;Review stored PL/SQL compilation errors requiring investigation.
SELECT
owner,
name,
type,
line,
position,
text
FROM dba_errors
ORDER BY owner, name, sequence;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;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;