Data pump Import and Export

Source: Internet
Author: User

To use a data pump, you must first create a database directory

Database directory only allows SYS to be created

Normal user must be authorized to use

Suppose Scott User is Export import user

Sql>! mkdir Dp_dir

Sql> Create directory Dp_dir as '/home/oracle/dp_dir ';

Directory created.

Sql> Grant Read,write on directory Dp_dir to Scott;

Grant succeeded.

Data Pump Export method: Export Scott User

Expdp

Export Case 1, export by table

EXPDP scott/tiger directory= dp_dir dumpfile=tab.dmp logfile=scott.log tables=dept,emp

Export Case 2, export by user

EXPDP scott/tiger directory= dp_dir dumpfile=dumpscott.dmp Schemas=scott

Export Case 3, full library export, and parallel export

EXPDP scott/tiger directory= dp_dir dumpfile=full.dmp parallel=4 full=y

Backup files in the/home/oracle/dp_dir/directory

Data Pump Import method: Import Scott User

IMPDP copying files to the/home/oracle/dp_dir/directory

Import Case 1, import by table, from Scott to Scott2

IMPDP scott2/tiger directory=dp_dir dumpfile=tab.dmp tables=scott.dept,scott.emp remap_schema=scott:scott2

Import Case 2, import by user, from Scott to Scott2

IMPDP scott/tiger directory= dp_dir dumpfile=schema.dmp remap_schema=scott:scott2

Import case 3, full library Import

IMPDP scott/tiger directory= dp_dir dumpfile=full.dmp full=y

Report:

Import operations for different users under different table spaces:

IMPDP username/password directory= ' The name of the directory you created ' dumpfile= ' exported file name '

Remap_schema= Exported user name: User name to import remap_tablespace= exported tablespace name: Table space name to import

IMPDP system/[email PROTECTED]/ORCL directory=dp_dir remap_schema=efmis_23_yanshi:efmis_23_20150511 transform=oid:n Dumpfile=efmis_23_yanshi_201505110900.dmp

EXPDP fasp_20000/[email protected]/ORCL directory=dp_dir dumpfile=dumpscott.dmp schemas=fasp_20000

EXPDP efmis_62/[email protected]/ORCL directory=dpdump dumpfile=efmis_62_20150821.dmp schemas=efmis_62

IMPDP system/[email protected]/orcl directory=dp_dir remap_schema=oa_0608:hqoa_20150806 dumpfile= OA_0608_20150806. DMP

Logfile=efmis_62_20150821.log

Data pump Import and Export

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.