The EXP export tool compresses the data backup in the database into a binary system file. Can be migrated between different OS
The Imp Import tool imports binary system files formed by exp into the database.
I. EXPORT TOOL EXP
It has three modes:
A. User mode: Export all user objects and data in the object;
B. Table mode: Export all tables or tables specified by the user;
C. Entire database: Exports all objects in the database.
$exp oa1/[email protected] file=d:/all.dmp grants=y
Description: Export all tables of the OA1 user to a file d:/all.dmp
$exp oa1/[email protected] tables= (pfdept,pfuser) file=d:/all.dmp grants=y
Description: Export the oa1 user's two tables emp,dept to a file d:/all.dmp
$exp oa1/[email protected] tables=pfdept query= "where predeptid=0745" file=d:/all.dmp
Description: Add the query condition of export pfdept in exp predeptid=0745
$exp parfile=username.par file=/directory1/username_1.dmp,/directory1/username_2.dmp Filesize=2000M log=/ Directory2/username_exp.log
Two. Import Tool imp
There are three types of modes:
A. User mode: Export all user objects and data in the object;
B. Table mode: Export all tables or tables specified by the user;
C. Entire database: Exports all objects in the database.
$ imp system/oracle fromuser=oa1 tables= (pfdept)
$ imp system/oracle fromuser=oa1 tables= (pfdept,pfuser)
$ imp system/oracle fromuser=oa1 Touser=system
$ imp oa1/123 file = All.dmp full=y
$ imp oa1/123 file = all.dmp show=n buffer=2048000 ignore=n commit=y grants=y full=y log=d:/.log
Use of the Oracle exp/imp Export Import Tool-1