Measure database storage
Review allocated datafile space to establish the source database footprint.
SELECT
ROUND(SUM(bytes) / 1024 / 1024 / 1024, 2) AS allocated_gb,
COUNT(*) AS datafiles
FROM dba_data_files;ORASOLU TOOLBOX · MIGRATION
Practical Oracle SQL for reviewing database footprint, schemas, objects, invalid objects, installed options and dependencies before a migration.
ORASOLU TOOLBOX · MIGRATION
A migration assessment should establish what is in the source database, how large it is, which objects require attention and which dependencies or database features may affect the migration method. These queries provide a practical starting point for that assessment.
Review allocated datafile space to establish the source database footprint.
SELECT
ROUND(SUM(bytes) / 1024 / 1024 / 1024, 2) AS allocated_gb,
COUNT(*) AS datafiles
FROM dba_data_files;Identify schemas and account status before planning users, ownership and migration scope.
SELECT
username,
account_status,
default_tablespace,
temporary_tablespace,
created
FROM dba_users
ORDER BY username;Count objects by schema and type to understand application and metadata complexity.
SELECT
owner,
object_type,
COUNT(*) AS object_count
FROM dba_objects
GROUP BY owner, object_type
ORDER BY owner, object_type;Identify invalid database objects that should be understood before or after the move.
SELECT
owner,
object_type,
object_name,
status
FROM dba_objects
WHERE status <> 'VALID'
ORDER BY owner, object_type, object_name;Review enabled database options that may influence migration planning and target requirements.
SELECT
parameter,
value
FROM v$option
ORDER BY parameter;Review object relationships that can help identify migration ordering and validation requirements.
SELECT
owner,
name,
type,
referenced_owner,
referenced_name,
referenced_type
FROM dba_dependencies
ORDER BY owner, name, referenced_owner, referenced_name;ORASOLU TOOLBOX · MIGRATION
Database size, schemas, objects, invalid objects, enabled options and dependencies provide the baseline for deciding what needs to move and what needs additional validation.
Use these queries as an assessment starting point and correlate the results with the migration method, target architecture and application requirements.