A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Calculate the necessary disk space for an Oracle EXPORT backup !!

5 min read

Size of the Data: Determine the size of the database objects you intend to export. This includes tables, indexes, and other database structures.

Compression: Decide whether you’ll use compression during the export process. Compressed exports require less disk space but may take longer to complete.

Export Options: Consider any additional options you’ll use during the export, such as including data only, metadata only, or both.

Export Method: Choose between a full database export or a schema-level export. The size will vary depending on the method you select.

Estimate Factor: Factor in any additional space required for temporary files, log files, and other overhead during the export process.

Once you have all the above information, you can estimate the required disk space by:

  1. Calculating the size of the data you intend to export.
  2. Adding any additional space required for compression or export options.
  3. Adding an estimate for temporary files and overhead.
ESTIMATE_ONLY parameter in Oracle Database:

ESTIMATE_ONLY parameter is utilized in EXPDP command, to estimate the disc space required for the export job, without doing the particular export.

Sometimes, we aren’t sure what is going to be the export dump size, then better to use this selection first, before taking the export backup.

ESTIMATE_ONLY=[YES | NO]

By default ESTIMATE_ONLY parameter is ESTIMATE_ONLY=NO.

Check the size of Schema :

SQL> col owner for a50
SQL> select OWNER,sum(bytes/1024/1024) "size MB" from dba_segments where owner='HR' group by owner;

OWNER						   size MB
----------------------------- ----------
HR						       1.5625

SQL> 

Create Logical & Physical Directory to store Dumpfile:

[oracle@localhost ~]$ mkdir -p /u01/export_import
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Aug 9 23:13:10 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> CREATE DIRECTORY EXP_IMP as '/u01/export_import';

Directory created.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

ESTIMATE required disk space for Full Database backup :

[oracle@localhost ~]$ expdp directory=EXP_IMP logfile=full.log ESTIMATE_ONLY=YES full=y

Export: Release 19.0.0.0.0 - Production on Wed Aug 14 02:47:39 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Username: / as sysdba
Password: 

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYS"."SYS_EXPORT_FULL_01":  /******** AS SYSDBA directory=EXP_IMP logfile=full.log ESTIMATE_ONLY=YES full=y 
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
.  estimated "SYS"."KU$_USER_MAPPING_VIEW"                  64 KB
.  estimated "WMSYS"."WM$CONSTRAINTS_TABLE$"               320 KB
.  estimated "SYS"."AUD$"                                  256 KB
.  estimated "WMSYS"."WM$LOCKROWS_INFO$"                   192 KB
.  estimated "WMSYS"."WM$UDTRIG_INFO$"                     192 KB
.  estimated "LBACSYS"."OLS$AUDIT_ACTIONS"                  64 KB
.  estimated "LBACSYS"."OLS$DIP_EVENTS"                     64 KB
.  estimated "LBACSYS"."OLS$INSTALLATIONS"                  64 KB
.  estimated "LBACSYS"."OLS$PROPS"                          64 KB
.  estimated "SYS"."DAM_CLEANUP_EVENTS$"                    64 KB
.  estimated "SYS"."DAM_CLEANUP_JOBS$"                      64 KB
.  estimated "SYS"."DAM_CONFIG_PARAM$"                      64 KB
.  estimated "SYS"."TSDP_ASSOCIATION$"                      64 KB
.  estimated "SYS"."TSDP_CONDITION$"                        64 KB
.  estimated "SYS"."TSDP_FEATURE_POLICY$"                   64 KB
.  estimated "SYS"."TSDP_PARAMETER$"                        64 KB
.  estimated "SYS"."TSDP_POLICY$"                           64 KB
.  estimated "SYS"."TSDP_PROTECTION$"                       64 KB
.  estimated "SYS"."TSDP_SENSITIVE_DATA$"                   64 KB
.  estimated "SYS"."TSDP_SENSITIVE_TYPE$"                   64 KB
.  estimated "SYS"."TSDP_SOURCE$"                           64 KB
.  estimated "SYS"."TSDP_SUBPOL$"                           64 KB
.  estimated "SYSTEM"."REDO_DB"                             64 KB
.  estimated "SYSTEM"."REDO_LOG"                            64 KB
.  estimated "WMSYS"."WM$BATCH_COMPRESSIBLE_TABLES$"        64 KB
.  estimated "WMSYS"."WM$CONS_COLUMNS$"                     64 KB
.  estimated "WMSYS"."WM$ENV_VARS$"                         64 KB
.  estimated "WMSYS"."WM$EVENTS_INFO$"                      64 KB
.  estimated "WMSYS"."WM$HINT_TABLE$"                       64 KB
.  estimated "WMSYS"."WM$MODIFIED_TABLES$"                  64 KB
.  estimated "WMSYS"."WM$MP_GRAPH_WORKSPACES_TABLE$"        64 KB
.  estimated "WMSYS"."WM$MP_PARENT_WORKSPACES_TABLE$"       64 KB
.  estimated "WMSYS"."WM$NESTED_COLUMNS_TABLE$"             64 KB
.  estimated "WMSYS"."WM$NEXTVER_TABLE$"                    64 KB
.  estimated "WMSYS"."WM$RESOLVE_WORKSPACES_TABLE$"         64 KB
.  estimated "WMSYS"."WM$RIC_LOCKING_TABLE$"                64 KB
.  estimated "WMSYS"."WM$RIC_TABLE$"                        64 KB
.  estimated "WMSYS"."WM$RIC_TRIGGERS_TABLE$"               64 KB
.  estimated "WMSYS"."WM$UDTRIG_DISPATCH_PROCS$"            64 KB
.  estimated "WMSYS"."WM$VERSION_HIERARCHY_TABLE$"          64 KB
.  estimated "WMSYS"."WM$VERSION_TABLE$"                    64 KB
.  estimated "WMSYS"."WM$VT_ERRORS_TABLE$"                  64 KB
.  estimated "WMSYS"."WM$WORKSPACES_TABLE$"                 64 KB
.  estimated "WMSYS"."WM$WORKSPACE_PRIV_TABLE$"             64 KB
.  estimated "WMSYS"."WM$WORKSPACE_SAVEPOINTS_TABLE$"       64 KB
.  estimated "LBACSYS"."OLS$AUDIT"                           0 KB
.  estimated "LBACSYS"."OLS$COMPARTMENTS"                    0 KB
.  estimated "LBACSYS"."OLS$DIP_DEBUG"                       0 KB
.  estimated "LBACSYS"."OLS$GROUPS"                          0 KB
.  estimated "LBACSYS"."OLS$LAB"                             0 KB
.  estimated "LBACSYS"."OLS$LEVELS"                          0 KB
.  estimated "LBACSYS"."OLS$POL"                             0 KB
.  estimated "LBACSYS"."OLS$POLICY_ADMIN"                    0 KB
.  estimated "LBACSYS"."OLS$POLS"                            0 KB
.  estimated "LBACSYS"."OLS$POLT"                            0 KB
.  estimated "LBACSYS"."OLS$PROFILE"                         0 KB
.  estimated "LBACSYS"."OLS$PROFILES"                        0 KB
.  estimated "LBACSYS"."OLS$PROG"                            0 KB
.  estimated "LBACSYS"."OLS$SESSINFO"                        0 KB
.  estimated "LBACSYS"."OLS$USER"                            0 KB
.  estimated "LBACSYS"."OLS$USER_COMPARTMENTS"               0 KB
.  estimated "LBACSYS"."OLS$USER_GROUPS"                     0 KB
.  estimated "LBACSYS"."OLS$USER_LEVELS"                     0 KB
.  estimated "SYS"."FGA_LOG$FOR_EXPORT"                    256 KB
.  estimated "SYS"."SQL$TEXT_DATAPUMP"                     192 KB
.  estimated "SYS"."SQLOBJ$DATA_DATAPUMP"                  192 KB
.  estimated "SYS"."SQL$_DATAPUMP"                         128 KB
.  estimated "SYS"."SQLOBJ$AUXDATA_DATAPUMP"               128 KB
.  estimated "SYS"."SQLOBJ$PLAN_DATAPUMP"                  128 KB
.  estimated "SYS"."SQLOBJ$_DATAPUMP"                      128 KB
.  estimated "SYSTEM"."SCHEDULER_JOB_ARGS"                 128 KB
.  estimated "SYSTEM"."SCHEDULER_PROGRAM_ARGS"             128 KB
.  estimated "SYS"."AUDTAB$TBS$FOR_EXPORT"                  64 KB
.  estimated "SYS"."DBA_SENSITIVE_DATA"                     64 KB
.  estimated "SYS"."DBA_TSDP_POLICY_PROTECTION"             64 KB
.  estimated "SYS"."NACL$_ACE_EXP"                          64 KB
.  estimated "SYS"."NACL$_HOST_EXP"                         64 KB
.  estimated "SYS"."NACL$_WALLET_EXP"                       64 KB
.  estimated "MDSYS"."RDF_PARAM$"                           16 KB
.  estimated "WMSYS"."WM$EXP_MAP"                           16 KB
.  estimated "WMSYS"."WM$METADATA_MAP"                      16 KB
.  estimated "RAM"."TABLE1"                                 11 MB
.  estimated "RAM"."TB1_HALDIRAM"                           11 MB
.  estimated "RAM"."TB1_HALDIRAM_BACKUP"                     5 MB
.  estimated "RAM"."TB2_HALDIRAM_BACKUP"                     5 MB
.  estimated "HR"."COUNTRIES"                               64 KB
.  estimated "HR"."DEPARTMENTS"                             64 KB
.  estimated "HR"."EMPLOYEES"                               64 KB
.  estimated "HR"."JOBS"                                    64 KB
.  estimated "HR"."JOB_HISTORY"                             64 KB
.  estimated "HR"."LOCATIONS"                               64 KB
.  estimated "HR"."REGIONS"                                 64 KB
Total estimation using BLOCKS method: 37.73 MB
Job "SYS"."SYS_EXPORT_FULL_01" successfully completed at Wed Aug 14 02:48:44 2024 elapsed 0 00:00:55

[oracle@localhost ~]$ 

Total estimation using BLOCKS method: 37.73 MB

ESTIMATE required disk space for a Schema backup :

[oracle@localhost ~]$ expdp  directory=EXP_IMP logfile=expdp_HR.log schemas=HR estimate_only=y

Export: Release 19.0.0.0.0 - Production on Wed Aug 14 02:45:45 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Username: / as sysdba
Password: 

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  /******** AS SYSDBA directory=EXP_IMP logfile=expdp_HR.log schemas=HR estimate_only=y 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
.  estimated "HR"."COUNTRIES"                               64 KB
.  estimated "HR"."DEPARTMENTS"                             64 KB
.  estimated "HR"."EMPLOYEES"                               64 KB
.  estimated "HR"."JOBS"                                    64 KB
.  estimated "HR"."JOB_HISTORY"                             64 KB
.  estimated "HR"."LOCATIONS"                               64 KB
.  estimated "HR"."REGIONS"                                 64 KB
Total estimation using BLOCKS method: 448 KB
Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Aug 14 02:46:20 2024 elapsed 0 00:00:20

[oracle@localhost ~]$ 

Total estimation using BLOCKS method: 448 KB

Hope it helped !! 🙂