IMPDP Specifies the table name when importing (remap_table, remap_tablespace, tables in IMPDP Considerations for specific tables only)

Source: Internet
Author: User
Tags one table

Remap_table, Remap_tablespace multiple sets of object conversions, separated by commas between each group of objects

When tables are multiple, each table is separated by commas

Remap_tablespace If you need to convert more than one table space, such as A1 conversion into B1,A2 to B1, like the next two ways

REMAP_TABLESPACE=A1:B1 REMAP_TABLESPACE=A2:B1

Remap_tablespace= A1:B1, A2:B1

Remap_table If you need to convert multiple table names

In the case of the same schema, such as A1 converted into b1,a2 into B1, as in the next two ways

REMAP_TABLE=A1:B1 REMAP_TABLE=A2:B1

Remap_table= A1:B1, A2:B1

IMPDP Some considerations about tables and Remap_tables

1. EXPDP Write tables= (table) indicates that some tables are exported; When IMPDP does not write tables when the table condition indicates that all the tables in the DumpFile are imported, the IMPDP (table) condition indicates that only the specified table is imported, and of course if tables= ( All tables in the dumpfile are imported into all tables in dumpfile, and schemas must be added to tables= (table) if IMPDP is executed with system. Table name, otherwise the default is the table under System, which causes an error

2. remap_table if in the same schema, although do not add remap_schema, but the table name before the remap_table Colon must have schema information, the table name after the colon must not take schema information

3. remap_table If in the case of a different schema, such as User1. A1 converted to User2.b1,user1.a2 to USER2.B1, must be remap_schema, and the table name in front of the remap_table colon must have schema information, the table name after the colon must not be with schema information

There are two different ways

Remap_table= user1. A1:b1 remap_table= user1. A2:B1 remap_schema= User1:user2

Remap_table= user1. A1:B1, User1. A2:B1 remap_schema= User1:user2

The standard way to export only import tables and rename across schemas is as follows

Tables are written in EXPDP. Table names are separated by commas

IMPDP need Remap_schema, tables can write not write, remap_table Colon before the table name plus schema, the table name after the colon does not add schema

EXPDP system/123456 tables=t01.test101,t01.test102,t01.test103 Directory=data_pump_dir dumpfile=t011.dbf

<span "=" "style=" Word-wrap:break-word; Color:rgb (102, 102, 102); Font-family: Song body, Arial; font-size:10.5pt; " > IMPDP system/123456 remap_schema=t01:t_101 tables=t01.test101,t01.test102,t01.test103 remap_table=t01.test101: test10101,t01.test102:test102,t01.test103:test103 Directory=data_pump_dir dumpfile=t011.dbf


A case
A server exports a partitioned table of user ESB Esb_log
EXPDP system/123456 directory=data_pump_dir dumpfile=esb_log.dmp logfile=esb_log.log Tables=ESB. Esb_log

The part user that was imported to the B server becomes esb_log (no Tables=esb added). Esb_log, in fact, add does not matter, anyway esb_log.dm is only a table of the ESB. Esb_log)
IMPDP system/123456 directory=data_pump_dir dumpfile=esb_log.dmp logfile=esb_log.log Remap_schema=ESB:part Tablespace=esb07:part,esb08:part,esb09:part,esb10:part,esb11:part,esb12:part,esb:part

The part user imported to the B server has the table name changed to ESB_LOG2 (plus tables=esb. Esb_log, in fact, add does not matter, anyway esb_log.dm is only a table Esb.esb_log)
IMPDP system/123456 directory=data_pump_dir dumpfile=esb_log.dmp logfile=esb_log2.log Tables=ESB. Esb_log Remap_schema=esb:part Remap_tablespace=esb07:part,esb08:part,esb09:part,esb10:part,esb11:part,esb12:part , Esb:part Remap_table=esb. ESB _log:esb _log2

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.