Home » RDBMS Server » Server Utilities » impdp with DATA_ONLY=y doesn't work (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production)
impdp with DATA_ONLY=y doesn't work [message #683206] Tue, 15 December 2020 03:41 Go to next message
Andrey_R
Messages: 363
Registered: January 2012
Location: Israel
Senior Member

Hi all,
I'm doing all kinds of impdp activities in the scope of which I am importing only metadata first, then the data itself, sepcific tables.

I've read about the parameter DATA_ONLY=y in official documentation:

https://docs.oracle.com/database/121/SUTIL/GUID-051EC293-8325-4D7B-B400-6287CD1EFB6D.htm#SUTIL3677

But when I tried it I got an error saying it's not recognizable by oracle:

[oracle@myserver mydumpdir]$
[oracle@myserver mydumpdir]$ impdp system/mypassword SCHEMAS=SCHEMA1 REMAP_SCHEMA=SCHEMA1:SCHEMA2 DUMPFILE=MYFILENAME.dmp LOGFILE=IMP_MYFILENAME_1.LOG DIRECTORY=DATA_PUMP_DIR transform=segment_attributes:n,oid:n DATA_ONLY=y TABLE_EXISTS_ACTION=TRUNCATE PARFILE=/mydumpdir/parfile_only_400_tables1.txt
LRM-00101: unknown parameter name 'DATA_ONLY'


According to a different page in the same documentation, the way to impdp data only is with the option name content..

https://docs.oracle.com/database/121/SUTIL/GUID-96AB8902-B838-43D2-95B0-D35C7589ADC6.htm#SUTIL955

And it indeed works for me:



[oracle@myserver mydumpdir]$ impdp system/mypassword SCHEMAS=SCHEMA1 REMAP_SCHEMA=SCHEMA1:SCHEMA2 DUMPFILE=MYFILENAME.dmp LOGFILE=IMP_MYFILENAME_1.LOG DIRECTORY=DATA_PUMP_DIR transform=segment_attributes:n,oid:n content=DATA_ONLY TABLE_EXISTS_ACTION=TRUNCATE PARFILE=/mydumpdir/parfile_only_400_tables1.txt

Import: Release 12.1.0.2.0 - Production on Tue Dec 15 04:07:11 2020

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

The question is, why didn't DATA_ONLY=y work for me, and what is the difference between the 2 parameters ?
Does the DATA_ONLY=y need specific conditions to be recognized by datapump utility ( like, not use a table list impdp with a parfile? ) ?

I guess, what I'm asking is, is the documentation wrong, or what am I missing here ( probably the 2nd option...) ?

Thanks in advance,
Andrey

[Updated on: Tue, 15 December 2020 03:47]

Report message to a moderator

Re: impdp with DATA_ONLY=y doesn't work [message #683208 is a reply to message #683206] Tue, 15 December 2020 04:20 Go to previous messageGo to next message
Michel Cadot
Messages: 67850
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

DATA_ONLY is an IMP parameter not an IMPDP one.
See your first link, it is in the "Original Import" chapter not in the "Data Pump Import" one.

Re: impdp with DATA_ONLY=y doesn't work [message #683209 is a reply to message #683208] Tue, 15 December 2020 04:24 Go to previous message
Andrey_R
Messages: 363
Registered: January 2012
Location: Israel
Senior Member

Michel Cadot wrote on Tue, 15 December 2020 12:20

DATA_ONLY is an IMP parameter not an IMPDP one.
See your first link, it is in the "Original Import" chapter not in the "Data Pump Import" one.


I see. Indeed makes sense.

And now when I am looking for hints for this difference I see that the "original import" is highlighted for the page containing DATA_ONLY=y part.

Many thanks.

Andrey
Previous Topic: EXPDP error after recovering CONTROL and DATAFILES
Next Topic: ORA-00922 during schema export
Goto Forum:
  


Current Time: Thu May 13 02:01:37 CDT 2021