0

I have 2 databases. I want to expdp operation on sample schema for first database and I want to impdp operation on second database. I finished as well expdp operation but I can't do clear impdp. I used this command for export:

 expdp system/password@ORACLE11 full=Y DIRECTORY=TEST_DIR dumpfile=expORACLE11.dmp logfile=expORACLE11log.log

And I used this command for impdp:

 impdp system/password@ORACLE22 full=Y directory=TEST_DIR dumpfile=expORACLE11.dmp logfile=imORACLE11.log

But it gives errors:

    - ORA-31684
    - ORA-39111
    - ORA-39151
    - ORA-31684

I researched them on internet and it says: "object type" error. I tried so many method but I can't find a clear solution. Thank you for help.

Hasan Fathi
  • 5,610
  • 4
  • 42
  • 60
  • ORA-31684, ORA-39111, ORA-39151 are all errors hurled when we try to import database objects which exist in the target database. So it seems database `ORACLE22` is already populated. In which case `full=Y` is probably not the best option. There are all sorts of `impdb` parameters which you could use to handle these various hurdles, but it depends on what you're really trying to achieve. So let's start with the root problem: why are you trying to import a FULL export into a non-empty database? – APC Oct 15 '19 at 11:00
  • @APC hi sir. ORACLE22 is an empty database, when I create it with dbca, I didn't select "Sample Schema" option. So it is empty. – newbieoracler Oct 15 '19 at 11:03
  • @APC should I create a new database or something else? – newbieoracler Oct 15 '19 at 11:05
  • I don't jnow what you've done so it's hard for me to comment. But if all you want to import is *sample schema* don't use `full=y`. Set it to N and use [`schemas=...`](https://docs.oracle.com/database/121/SUTIL/GUID-6FEDE3AF-0ED5-46D6-BE91-C3F840291735.htm#SUTIL931) to specify the thing you actually want to import. – APC Oct 15 '19 at 11:08
  • @APC I want to import all of database. – newbieoracler Oct 15 '19 at 11:09
  • Hmm. Look, ORA-31684 should tell you the object type, the owning schema and the object name. So that should tell you diagnose what's going on. My bet is, this is not the first time you've run an import against the target, and what you're looking at is the aftermath of a previous (failed? incomplete?) import. – APC Oct 15 '19 at 11:14
  • @APC sir, https://oracle-base.com/articles/10g/oracle-data-pump-10g#DatabaseExpImp can you check this link? I just tried "Database Exports / Imports" title but it don't work. – newbieoracler Oct 15 '19 at 11:17

0 Answers0