import dump issues

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

import dump issues

Roshan
Oracle Database 11.2.0.4

RHEL 6

 
Hi team,

I have imported 5 tables from a full export dump of a production on a test instance on DNRTOOL schema

 

impdp \"/ as sysdba\" directory=GCIDNR  file=$arch remap_schema=l2tcp:dnrtool tables=l2tcp.gci_preorde

r,l2tcp.gci_ref_bb_offer,l2tcp.gci_ref_billing_ticket,l2tcp.gci_iptv_zte,l2tcp.gci_premium_log log=impgci`(date +"%d%m

%Y%H%M")`.log

 

The export script is shown below.

expdp  \"/ as sysdba\" dumpfile=L2TCP`(date +"%d%m%Y%H%M")`.dmp logfile=L2TCPexpdp.`(date +"%d%m%Y%H%M")`.log FULL=Y parallel=2 directory=myexport

 

The issue is additional stored procedures, functions and views of l2tcp schema have also been imported on DNRTOOL schema. Is there a way I can remove them?


 

Regards,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: import dump issues

ErmanArslansOracleBlog
Administrator
See Datapump 's "exclude" option..
Reply | Threaded
Open this post in threaded view
|

Re: import dump issues

Roshan
Should I drop the tables and append
EXCLUDE=FUNCTION
EXCLUDE=PROCEDURE
EXCLUDE=PACKAGE
EXCLUDE=INDEX

in a par file?

Will the import automatically remove the above objects?
Reply | Threaded
Open this post in threaded view
|

Re: import dump issues

ErmanArslansOracleBlog
Administrator
What you mean exactly? remove? impdp has no remove feature.. It imports or it doesn't import.

Yes. You can write them to a par file and then use that par file with your impdp command.

impdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmp PARFILE=exclude.par
Reply | Threaded
Open this post in threaded view
|

Re: import dump issues

Roshan
Ok thanks Erman

I managed to find out the unwanted objects using the query attached
output1.sql
Reply | Threaded
Open this post in threaded view
|

Re: import dump issues

Roshan
In reply to this post by ErmanArslansOracleBlog
Hi Erman,

I am getting the error below

ORA-39002: invalid operation
ORA-39168: Object path INDEX was not found.
ORA-39168: Object path PACKAGE was not found.
ORA-39168: Object path PROCEDURE was not found.
ORA-39168: Object path FUNCTION was not found.

Please find below full import script

 impdp \"/ as sysdba\" directory=GCIDNR full=y EXCLUDE=PACKAGE,FUNCTION,SEQUENCE  file=$arch remap_sche
ma=l2tcp:dnrtool  log=impgci`(date +"%d%m%Y%H%M")`.log

Regards,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: import dump issues

ErmanArslansOracleBlog
Administrator
This is another question.
Please create another issue for this.