A matter for attention when EXPDP and IMPDP use EXPDP and IMPDP:
Exp and imp are client-side utility programs that can be used either on the client or on the server side.
EXPDP and IMPDP are service-side tools that they can use only on the Oracle server and not on the client side.
IMP applies only to the files exported by exp, not to EXPDP export files, IMPDP only to EXPDP exported files, not to exp export files.
EXPDP or IMPDP command, you can temporarily not point to the username/password @ instance name as identity, and then enter according to the prompts, such as:
EXPDP Schemas=scott dumpfile=expdp.dmp directory=dpdata1;
Create a logical directory that does not create a real directory on the operating system, preferably with an administrator such as system.
Create directory dpdata1 as ' D:\test\dump ';
Second, view the Administrator directory (also see if the operating system exists, because Oracle does not care if the directory exists, if it does not exist, then an error)
SELECT * from Dba_directories;
Third, give Scott user in the specified directory operation permissions, preferably with system and other administrators to give.
Grant Read,write on directory dpdata1 to Scott;
Iv. Export of data
1) Guided by user
EXPDP SCOTT/TIGER@ORCL Schemas=scott dumpfile=expdp.dmp directory=dpdata1;
2) Parallel Process parallel
EXPDP scott/tiger@orcl directory=dpdata1 dumpfile=scott3.dmp parallel=40 job_name=scott3
3) Guided by the name of the table
EXPDP SCOTT/TIGER@ORCL tables=emp,dept dumpfile=expdp.dmp directory=dpdata1;
4) According to the query conditions guide
EXPDP scott/tiger@orcl directory=dpdata1 dumpfile=expdp.dmp tables=emp query= ' WHERE deptno=20 ';
5) According to the Table space Guide
EXPDP System/manager directory=dpdata1 dumpfile=tablespace.dmp tablespaces=temp,example;
6) Guide the entire database
EXPDP System/manager directory=dpdata1 dumpfile=full.dmp full=y;
Five, restore data
1) directed to the designated user
IMPDP Scott/tiger directory=dpdata1 dumpfile=expdp.dmp Schemas=scott;
2) Change the owner of the table
IMPDP system/manager directory=dpdata1 dumpfile=expdp.dmp tables=scott.dept remap_schema=scott:system;
3) Import Table space
IMPDP System/manager directory=dpdata1 dumpfile=tablespace.dmp tablespaces=example;
4) Import Database
impdb System/manager directory=dump_dir dumpfile=full.dmp full=y;
5) Append Data
IMPDP system/manager directory=dpdata1 dumpfile=expdp.dmp schemas=system table_exists_action
Two additional instructions parallel operations (PARALLEL)
You can use more than one thread for export by using the PARALLEL parameter to significantly speed up the job. Each thread creates a separate dump file, so the parameter dumpfile should have as many items as the degree of parallelism. Instead of explicitly entering individual file names, you can specify wildcard characters as file names, such as:
EXPDP ananda/abc123 tables=cases directory=dpdata1 dumpfile=expcases_%u.dmp parallel=4
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.