top of page

Importing a Data Pump Export from Azure Blob Storage into Autonomous Database on Oracle Database@Azure

OmerNarman
Oct 26
8 min read

Autonomous Database does not give you a file system or SSH access, so the classic "copy the dump file to the server and run impdp" does not work. Instead, Data Pump in Autonomous Database reads dump files directly from object storage through a credential. On Oracle Database@Azure that object storage can be an Azure Blob Storage container in the same region, which keeps the data inside Azure the whole way.


This post moves one application schema from an on-premises Oracle Database 19c into Autonomous Database on Oracle Database@Azure. We size the schema, export it, upload the dump files to Blob Storage, create the credential, run the import, read the log and validate the result.



The Use Case

A reporting schema, SALES, is moving from an on-premises database to Autonomous Database on Oracle Database@Azure, next to the reporting tools that already run in Azure. A logical copy with Data Pump is the supported route into Autonomous Database, and an outage of a few hours on a Saturday is acceptable for this schema.


Environment used in this runbook


  • Source: Oracle Database 19c (19.24) on Linux, on premises, schema SALES

  • Target: Autonomous Database on Oracle Database@Azure, database salesadb, Data Warehouse workload, 8 ECPUs

  • Staging: Azure storage account salesmigst, container dumps, in the same Azure region as the database

  • Client host: a Linux VM in Azure with Oracle Instant Client 23 (Data Pump tools included) and the Autonomous Database wallet

  • Network: the Autonomous Database has a private endpoint in the delegated subnet, and the client VM is in a peered virtual network



How the Import Works

  • Dump files stay in object storage. impdp runs on the client host, but the import itself runs inside Autonomous Database, which reads the dump files from the Blob container over HTTPS.

  • A credential holds the access key. DBMS_CLOUD.CREATE_CREDENTIAL stores the storage account name and key in the database. Data Pump uses it through the CREDENTIAL parameter.

  • The dump file name is a URL. Instead of a file name in a directory, DUMPFILE is the full Blob URL, with %U for multiple files.

  • The log file lands in DATA_PUMP_DIR. Autonomous Database writes it to its own directory object, from which you can copy it out to the container.



Step 1: Size the Schema and Check for Surprises

Before exporting, know how big the schema is and whether it contains anything Autonomous Database will not accept, such as objects in the SYSTEM tablespace, database links that will not resolve, or Java classes.


SQL

-- On the source, as a DBA

SELECT ROUND(SUM(bytes)/1024/1024/1024, 1) AS gb, COUNT(*) AS segments

FROM dba_segments

WHERE owner = 'SALES';

SELECT object_type, COUNT(*) AS objects

FROM dba_objects

WHERE owner = 'SALES'

GROUP BY object_type

ORDER BY objects DESC

FETCH FIRST 6 ROWS ONLY;

Expected output

        GB   SEGMENTS
---------- ----------
     184.6       2318

OBJECT_TYPE                OBJECTS
----------------------- ----------
INDEX                         1206
TABLE                          884
INDEX PARTITION                612
TABLE PARTITION                408
VIEW                           131
DATABASE LINK                    2

What to expect: The size tells you how long the upload will take and how much storage the Autonomous Database needs. Note anything unusual: here two database links, which will need new definitions in Azure (and a credential) after the import. Oracle's Cloud Premigration Advisor Tool (CPAT) runs a complete compatibility check for Autonomous Database if you want more than these two queries.



Step 2: Export the Schema on the Source

Export to a local directory with several files of a fixed size, so the upload and the import can both run in parallel. Statistics are excluded because Autonomous Database gathers its own.


Shell

# On the source host, as oracle

mkdir -p /u05/dumps

sqlplus -s / as sysdba <<'EOF'

CREATE OR REPLACE DIRECTORY mig_dir AS '/u05/dumps';

EOF

expdp system SCHEMAS=SALES DIRECTORY=mig_dir \

DUMPFILE=sales_%U.dmp FILESIZE=10G PARALLEL=8 \

EXCLUDE=STATISTICS LOGFILE=sales_exp.log METRICS=YES

ls -lh /u05/dumps/sales_*.dmp | head -3

Expected output

Export: Release 19.0.0.0.0 - Production on Sat Oct 24 06:02:11 2026
...
Total estimation using BLOCKS method: 184.6 GB
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
...
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u05/dumps/sales_01.dmp
  /u05/dumps/sales_02.dmp
  ...
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Sat Oct 24 06:41:37 2026 elapsed 0 00:39:26

-rw-r-----. 1 oracle oinstall 10G Oct 24 06:39 /u05/dumps/sales_01.dmp
-rw-r-----. 1 oracle oinstall 10G Oct 24 06:40 /u05/dumps/sales_02.dmp
-rw-r-----. 1 oracle oinstall 10G Oct 24 06:40 /u05/dumps/sales_03.dmp

What to expect: "successfully completed" and a set of 10 GB files. Data Pump dump files are not compressed by default; COMPRESSION=ALL makes them smaller but requires the Advanced Compression option on the source. If the schema is still in use during the export, add FLASHBACK_TIME=SYSTIMESTAMP so all tables are consistent to one point in time.



Step 3: Upload the Dump Files to Azure Blob Storage

Create a private container and upload the files. The Azure CLI uploads in parallel and retries failed blocks; for very large sets, azcopy is faster still.


Shell

az storage container create --account-name salesmigst --name dumps --auth-mode login

az storage blob upload-batch --account-name salesmigst --auth-mode login \

--destination dumps --source /u05/dumps --pattern 'sales_*.dmp' --max-connections 8

az storage blob list --account-name salesmigst --container-name dumps --auth-mode login \

--query "length([])"

Expected output

{
  "created": true
}

19

What to expect: The container is created with no public access (the default), and 19 blobs arrive: one per dump file. With --auth-mode login, the CLI uses your Microsoft Entra ID sign-in, which needs the Storage Blob Data Contributor role on the account. Over ExpressRoute at 1 Gbit/s, 185 GB takes roughly 30 minutes.



Step 4: Create the Credential in Autonomous Database

Connect to the Autonomous Database as ADMIN with the wallet, and store the storage account name and one of its access keys in a credential. For Azure Blob Storage, the user name is the storage account name and the password is the account key.


SQL

-- From the client VM: sqlplus admin@salesadb_high (TNS_ADMIN points to the wallet)

BEGIN

DBMS_CLOUD.CREATE_CREDENTIAL(

credential_name => 'AZURE_DUMPS_CRED',

username => 'salesmigst',

password => '<storage-account-access-key>');

END;

/

SELECT credential_name, username, enabled

FROM user_credentials

WHERE credential_name = 'AZURE_DUMPS_CRED';

Expected output

PL/SQL procedure successfully completed.

CREDENTIAL_NAME      USERNAME             ENABLED
-------------------- -------------------- -------
AZURE_DUMPS_CRED     salesmigst           TRUE

What this does: It stores the key encrypted in the database. The key is never shown again, only the user name. Copy the key from the Azure portal (storage account > Access keys) straight into the statement and clear your clipboard afterwards. Rotate the key in Azure once the migration is finished, which also invalidates this credential.



Step 5: Prove That the Database Can See the Files

Before starting a long import, check that the Autonomous Database can reach the container through its network path and read the file list with the credential.


SQL

COLUMN object_name FORMAT A16

SELECT object_name, ROUND(bytes/1024/1024/1024, 1) AS gb

FROM DBMS_CLOUD.LIST_OBJECTS(

'AZURE_DUMPS_CRED',

'https://salesmigst.blob.core.windows.net/dumps/')

ORDER BY object_name

FETCH FIRST 3 ROWS ONLY;

Expected output

OBJECT_NAME              GB
---------------- ----------
sales_01.dmp             10
sales_02.dmp             10
sales_03.dmp             10

What to expect: The dump files and their sizes. If the call fails with ORA-20401 (authorisation failed), the key or account name is wrong. If it hangs and then fails with a network error, the private endpoint of the Autonomous Database cannot reach the storage account: give the storage account a private endpoint in a virtual network the database's subnet can route to, and make sure the privatelink.blob.core.windows.net DNS zone resolves the account name to that private address.



Step 6: Prepare the Target Schema Settings

Autonomous Database manages its own tablespaces: application data goes into DATA. Decide now how the import should map storage, and check how much space is free.


SQL

SELECT tablespace_name, ROUND(SUM(bytes)/1024/1024/1024) AS used_gb

FROM dba_segments

GROUP BY tablespace_name

ORDER BY tablespace_name;

SELECT ROUND(SUM(bytes)/1024/1024/1024) AS allocated_gb FROM dba_data_files;

Expected output

TABLESPACE_NAME                   USED_GB
------------------------------ ----------
DATA                                   12
SAMPLESCHEMA                           18
SYSAUX                                  6
SYSTEM                                  2

ALLOCATED_GB
------------
        1024

What to expect: A mostly empty database with 1 TB of storage, enough for the 185 GB schema plus indexes rebuilt during the import. If your source used several tablespaces, TRANSFORM=SEGMENT_ATTRIBUTES:N in the next step drops the storage clauses, so every object lands in DATA without a long REMAP_TABLESPACE list.



Step 7: Run the Import

Run impdp on the client VM, connected to the database's high service. The dump file is the Blob URL with %U, and the parallel degree should not exceed the number of ECPUs.


Shell

impdp admin@salesadb_high \

DIRECTORY=data_pump_dir \

CREDENTIAL=AZURE_DUMPS_CRED \

DUMPFILE=https://salesmigst.blob.core.windows.net/dumps/sales_%U.dmp \

SCHEMAS=SALES PARALLEL=8 \

TRANSFORM=SEGMENT_ATTRIBUTES:N \

TRANSFORM=DWCS_CVT_IOTS:Y TRANSFORM=CONSTRAINT_USE_DEFAULT_INDEX:Y \

EXCLUDE=CLUSTER,DB_LINK \

LOGFILE=sales_imp.log METRICS=YES

Expected output

Import: Release 23.0.0.0.0 - Production on Sat Oct 24 08:10:05 2026
Connected to: Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems
Master table "ADMIN"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "ADMIN"."SYS_IMPORT_SCHEMA_01":  admin/********@salesadb_high DIRECTORY=data_pump_dir ...
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/TABLE/TABLE
     Completed 884 TABLE objects in 38 seconds
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SALES"."ORDER_LINES":"P2026_09"           11.2 GB  96612001 rows in 412 seconds
...
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
     Completed 1206 INDEX objects in 1904 seconds
Job "ADMIN"."SYS_IMPORT_SCHEMA_01" completed with 2 error(s) at Sat Oct 24 09:31:48 2026 elapsed 0 01:21:43

What this does: CREDENTIAL tells Data Pump how to read the URL. TRANSFORM=SEGMENT_ATTRIBUTES:N ignores the source storage clauses; DWCS_CVT_IOTS converts index-organised tables, which are recommended against on the Data Warehouse workload; CONSTRAINT_USE_DEFAULT_INDEX names constraint indexes after their constraints. EXCLUDE drops clusters and the database links you will recreate by hand. A small number of errors is normal, typically grants to users that do not exist in the target: read every one in the log before accepting it.


Tip: Import into a Data Warehouse workload with the high service, and into a Transaction Processing workload with the high or medium service. The low service runs serially and makes a large import much slower.


Step 8: Read the Log File and Copy It Out

The log file is in DATA_PUMP_DIR inside the Autonomous Database. List it, then copy it to the Blob container so it is kept with the dump files and can be read with any tool.


SQL

COLUMN object_name FORMAT A16

SELECT object_name, bytes, TO_CHAR(last_modified,'YYYY-MM-DD HH24:MI') AS modified

FROM DBMS_CLOUD.LIST_FILES('DATA_PUMP_DIR')

WHERE object_name LIKE 'sales%';

BEGIN

DBMS_CLOUD.PUT_OBJECT(

credential_name => 'AZURE_DUMPS_CRED',

object_uri => 'https://salesmigst.blob.core.windows.net/dumps/sales_imp.log',

directory_name => 'DATA_PUMP_DIR',

file_name => 'sales_imp.log');

END;

/

Expected output

OBJECT_NAME           BYTES MODIFIED
---------------- ---------- ----------------
sales_imp.log        418226 2026-10-24 09:31

PL/SQL procedure successfully completed.

What to expect: The log file in DATA_PUMP_DIR and a copy in the container. Search it for ORA- and look at each error. The two errors in this example were ORA-01917 on grants to REPORT_RO, a role that did not exist yet in Autonomous Database: create the role and re-run the grants.



Step 9: Validate the Imported Schema

Compare the object counts per type with the source query from Step 1, recompile anything invalid, and check row counts on the tables that matter most.


SQL

SELECT object_type, COUNT(*) AS objects,

SUM(CASE status WHEN 'INVALID' THEN 1 ELSE 0 END) AS invalid

FROM dba_objects

WHERE owner = 'SALES'

GROUP BY object_type

ORDER BY objects DESC

FETCH FIRST 5 ROWS ONLY;

EXEC DBMS_UTILITY.COMPILE_SCHEMA(schema => 'SALES', compile_all => FALSE);

SELECT COUNT(*) AS order_lines FROM sales.order_lines;

Expected output

OBJECT_TYPE                OBJECTS    INVALID
----------------------- ---------- ----------
INDEX                         1206          0
TABLE                          884          0
INDEX PARTITION                612          0
TABLE PARTITION                408          0
VIEW                           131          3

PL/SQL procedure successfully completed.

ORDER_LINES
-----------
  412886120

What to expect: The same counts as on the source, apart from the excluded database links. Three views were invalid because they used the database links; they become valid once the links are recreated with DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK. Compare the row counts with the same queries on the source, run before the export.



Step 10: Clean Up the Staging Area

Once the business has signed off, remove the copies that are no longer needed: the dump files hold a full copy of the schema, so they should not stay in a storage account indefinitely.


SQL

BEGIN

DBMS_CLOUD.DROP_CREDENTIAL(credential_name => 'AZURE_DUMPS_CRED');

DBMS_CLOUD.DELETE_FILE(directory_name => 'DATA_PUMP_DIR', file_name => 'sales_imp.log');

END;

/


Shell

az storage blob delete-batch --account-name salesmigst --auth-mode login \

--source dumps --pattern 'sales_*.dmp'

az storage account keys renew --account-name salesmigst --key primary


What this does: It drops the credential and the log file inside the database, deletes the dump files from the container (the copied log file stays as a record), and rotates the storage account key that was used, so the old key is useless even if it was copied somewhere during the migration.



Summary

To load a Data Pump export into Autonomous Database on Oracle Database@Azure, export the schema in fixed-size files on the source, upload them to a private Blob container in the same region, and store the account name and key in a DBMS_CLOUD credential. Check the files with DBMS_CLOUD.LIST_OBJECTS before you start, run impdp from a client VM with the Blob URL as the dump file, the credential, the high service and a parallel degree that matches the ECPUs, then copy the log out with DBMS_CLOUD.PUT_OBJECT. Validate the counts, recreate database links, and clean up the dump files and the key once the migration is signed off.

Recent Posts

See All

Comments


bottom of page