Oracle Export Metadata only And Import the
Metadata only Guide – Step-by-Step Tutorial
In this guide, we will learn how to use expdp (Data Pump Export) and impdp (Data Pump Import) in Oracle Database to back up metadata and restore the same only.
To create a backup, first we have to set up a physical backup location.
Creating a Backup location:
On Linux server:
mkdir -p /data/backup
On Oracle Database:
Exporting a Metadata using expdp:
To backup the Metadata for Schema U2,
expdp schemas=U2 directory=TEST_DIR2 dumpfile=schdata_only2.dmp logfile=schdata_only.log content=METADATA_ONLY
Note:
Dump File (.dump): A binary file generated by expdp that contains exported schema objects, data, and metadata. It is used for backup and migration.
Log File (.log): A text file that records details of the export/import process, including progress, errors, and warnings. It helps in troubleshooting.
After running the command, you will be prompted to connect the database.
Connect using sys user and press enter when asked for a password.
Export schema U2 Metadata completes successfully.
Before importing specific schema U2 metadata we must drop the same schema if already exists.
Why? If the schema already exists, we cannot re-import the same table without errors.
why cascade?
using cascade you will be drop the everything in the schema U2.
Summary of Steps
Final Thoughts
More useful links:
[Oracle Export Specific Tablespace And Import Specific Table only Guide – Step-by-Step Tutorial]: (https://arbnumberone.blogspot.com/2025/03/oracle-export-specific-tablespace-and.html)
[Oracle Export Schema or User And Import Schema or User Guide – Step-by-Step Tutorial]: (https://arbnumberone.blogspot.com/2025/03/oracle-database-schema-export-and.html)
[Oracle Database Export Table & Import Table Guide – Step-by-Step Tutorial]: (https://arbnumberone.blogspot.com/2025/03/export-and-import-how-to-works-in.html)
Comments
Post a Comment