Oracle Export Specific Tablespace And Import
Specific Table 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 specific tablespace and restore the required table 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:
Command:
create a directory TEST_DIR2 as '/data/backup';
Here, TEST_DIR2 is a logical directory pointing to the physical backup location.
To verify the directory:
SELECT * FROM dba_directories WHERE directory_name = 'TEST_DIR2';
Exporting a Tablespace using expdp:
To backup the Tablespace USERS,
expdp tablespaces=USERS directory='TEST_DIR2' dumpfile=TBS.dump logfile=TBS.log
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 Tablespace USERS completes successfully.
Comments
Post a Comment