Oracle Data Pump Export Demo steps
1. Create a directory with Oracle users
mkdir Software_bak
[Email protected] ~]$ CD software_bak/
[Email protected] software_bak]$ pwd
/home/oracle/software_bak
2. set up the catalogue and authorize
Sql> Show user;
USER is "SYSTEM"
Sql> Create directory Software_bak as '/home/oracle/software_bak ';
Sql> Grant Read, write on directory software_bak to software;
Grant succeeded.
3.
Second, View the Administrator directory (also see if the operating system exists, because Oracle does not care if the directory exists, and if it does not exist, an error occurs)
Sql>select * from Dba_directories;
4. Export Data
View the exported data
Export a table
EXPDP software/oracle directory=software_bak dumpfile=software.dmp tables= users
Log in to the database using software:
View table:
Sql> select * from users;
Id
----------
1
2
3
To delete a table:
drop table users;
Check Again
Sql> select * from users;
SELECT * from Users
*
ERROR at line 1:
Ora-00942:table or view does not exist
Import Table:
IMPDP software/oracle directory=software_bak dumpfile=software.dmp tables= users
Log in to the database using software:
To see if a table exists:
Sqlplus software/oracle
Sql> Show user;
USER is "Software"
Sql> select * from users;
Id
----------
1
2
3
Data has been restored
Oracle Data Pump Export table