Oracle - import data into a table with a different name?

I have a large (multi-GB) data file exported from an Oracle table. I want to import this data into another instance of Oracle, but I want the table name to be different from the original table. Is it possible? How?

Both import and export systems are Oracle 11g. The table contains a BLOB column, if that matters.

Thank!

UPDATES

The idea here was to update the table, saving downtime in the system, using it with minimal values. Solution (based on Vincent Malgrat and APC update:

  • Assuming our table name A
  • Make a temporary scheme TEMP_SCHEMA
  • Import our data into TEMP_SCHEMA.A
  • CREATE REAL_SCHEMA.B AS SELECT * FROM TEMP_SCHEMA.A
  • DROP TABLE REAL_SCHEMA.ARename REAL_SCHEMA.AtoREAL_SCHEMA.A_OLD
  • Rename REAL_SCHEMA.BtoREAL_SCHEMA.A
  • DROP REAL_SCHEMA.A_OLD

, 4 5, . , : -)

+3
5

, , . , . FROMUSER TOUSER. () .

, CREATE TABLE AS SELECT. , , , . .

Update

Gary, , . , .

+2

EXP IMP, . - ( , .

, , 11g. DataPump, 10g, . 11g REMAP_TABLE, , .

, OP , , , REMAP_TABLE . . , ORA-39151. .

bis

, OP ( , ), Data Pump, TABLE_EXISTS_ACTION={TRUNCATE | REPLACE}. REPLACE , TRUNCATE , er, . , .

OP, , .

+4

REMAP_TABLE = EXISITNG_TABLE_NAME: NEW_TABLE_NAME impdp. 11gR2.

+2

, .

+1

Create the view as the select * from ...table you want to import into, with the view matching the name of the table in the export. Ignore import errors.

+1
source

Source: https://habr.com/ru/post/1725637/


All Articles