Oracle Data Pump content = data_only

Source: Internet
Author: User

Oracle Data Pump content = data_only

Next, let's look at a test to verify that the data can be restored only after being exported. Even if the table structure has changed, it can restore the corresponding columns,

1) SQL> desc liuwenhe. liuwenhe;

Name Null? Type

-----------------------------------------------------------------------------

X not null number (38)

Y number (38)
2) SQL> select * from liuwenhe. liuwenhe;

X Y

--------------------

1
3
3
3
2
4
4
5
5
8
6
9
 
6 rows selected.
3) [Oracle @ rac1 expdp] $ expdp system/manager123 directory = bak dumpfile = hhhf. dmp tables = liuwenhe. liuwenhe;

Export: Release 11.2.0.3.0-Production on Mon Jul 6 11:52:56 2015

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
And Real Application Testing options
Starting "SYSTEM". "SYS_EXPORT_TABLE_03": system/********* directory = bak dumpfile = hhhf. dmp tables = liuwenhe. liuwenhe
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
.. Exported "LIUWENHE". "LIUWENHE" 5.492 KB 6 rows
Master table "SYSTEM". "SYS_EXPORT_TABLE_03" successfully loaded/unloaded
**************************************** **************************************
Dump file set for SYSTEM. SYS_EXPORT_TABLE_03 is:
/Backup/expdp/hhhf. dmp
Job "SYSTEM". "SYS_EXPORT_TABLE_03" successfully completed at 11:53:10
4) SQL> alter table liuwenhe. liuwenhe drop column y;
 
Table altered.
5) SQL> truncate table liuwenhe. liuwenhe;
 
Table truncated.
6) [oracle @ rac1 expdp] $ impdp system/manager123 directory = bak dumpfile = hhhf. dmp tables = liuwenhe. liuwenhe content = data_only;
 
Import: Release 11.2.0.3.0-Production on Mon Jul 6 11:55:07 2015

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

And Real Application Testing options

Master table "SYSTEM". "SYS_IMPORT_TABLE_04" successfully loaded/unloaded

Starting "SYSTEM". "SYS_IMPORT_TABLE_04": system/********* directory = bak dumpfile = hhhf. dmp tables = liuwenhe. liuwenhe content = data_only

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

.. Imported "LIUWENHE". "LIUWENHE" 5.492 KB 6 rows

Job "SYSTEM". "SYS_IMPORT_TABLE_04" successfully completed at 11:55:13

7) SQL> select * from liuwenhe. liuwenhe;

X

----------

1

2

3

4

5

6

6 rows selected.

Summary: Oracle Data Pump, logical backup and recovery tools, which operate on the logical plane directly, cannot be imagined as a simple insert, and only export data, and then restore data, you do not need to write the remap_tablespace parameter, tables = liuwenhe. if liuwenhe is written as tables = liuwenhe without the prefix liuwenhe, the system considers it as the liuwenhe table under the system user, and an error occurs.

Related Article

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.