9 Replies Latest reply on May 19, 2014 4:00 PM by Emad Al-Mousa

    Oracle 12c DATA_PUMP_DIR

    user632098

      I have a container database which several pluggable databases.

      When I tried to an expdp on a pluggable database, it gave me an error  ORA-39002  Invalid operation…

       

      I did some search on google  which indicates that I have to create a separated directory like PDB1_DATA_PUMP_DIR and specify it in expdp…

      However when I look in cdb_directories under root container, I see that original DATA_PUMP_DIR is associated with all containers, then why  do I have to create something like  PDB1_DATA_PUMP_DIR.

        • 1. Re: Oracle 12c DATA_PUMP_DIR
          sb92075

          I am not sure what you have, what you do or what you see.

           

          39002, 00000, "invalid operation"

          // *Cause:  The current API cannot be executed because of inconsistencies

          //          between the API and the current definition of the job.

          //          Subsequent messages supplied by DBMS_DATAPUMP.GET_STATUS

          //          will further describe the error.

          // *Action: Modify the API call to be consistent with the current job or

          //          redefine the job in a manner that will support the specified API.

          • 2. Re: Oracle 12c DATA_PUMP_DIR
            user632098

            ORA-39070 Unable to open the log file

            ORA-39087 directory name DATA_PUMP_DIR is invalid.

            • 3. Re: Oracle 12c DATA_PUMP_DIR
              sb92075

              When you do things wrong, then errors get thrown.

               

              Since you refuse to actually show us what you do, we can't know what you do wrong.

              Does OS user have necessary OS permission to actually write the log file?

               

              How do I ask a question on the forums?

              https://forums.oracle.com/message/9362002#9362002

              • 4. Re: Oracle 12c DATA_PUMP_DIR
                user632098

                Yes, OS user has permssion to write to that directory. It seems to me some kind of bug in Oracle 12c. When I created a directoy of my own in PDB1 and specified that directory explicily it worked.

                 

                Reason I say it is a bug, because default DATA_PUMP_DIR is shown under cdb_directories for each conatiner, yet it requires a separte directory fot each pluggable database.

                • 5. Re: Oracle 12c DATA_PUMP_DIR
                  sb92075

                  If you have bug, posting here is a waste of everyone's time.

                  Submit Bug Report to MOS

                  • 6. Re: Oracle 12c DATA_PUMP_DIR
                    Franck Pachot

                    Hi,

                    The DATA_PUMP_DIR in the root directory cannot be used from the pluggable databases. When in a pluggable you have to use the pluggable directories (which can have a relative path that will be resolved by PATH_PREFIX)

                    Regards,

                    Franck.

                    • 7. Re: Oracle 12c DATA_PUMP_DIR
                      rp0428
                      Yes, OS user has permssion to write to that directory. It seems to me some kind of bug in Oracle 12c. When I created a directoy of my own in PDB1 and specified that directory explicily it worked.

                       

                      Reason I say it is a bug, because default DATA_PUMP_DIR is shown under cdb_directories for each conatiner, yet it requires a separte directory fot each pluggable database.

                      No - it is NOT a bug. That is the way it is DESIGNED to work and the documentation tells you that.

                       

                      See the data pump chapter of the Utilities doc:

                      http://docs.oracle.com/cd/E16655_01/server.121/e17639/dp_overview.htm

                      Be aware of the following requirements when using Data Pump to move data into a CDB:

                      . . .

                      •   The default Data Pump directory object, DATA_PUMP_DIR, does not work with PDBs. You must define an explicit directory object within the PDB that you are exporting or importing.

                      As I have often stated - developers will NOT be successful using many features of Oracle 12c unless/until they have RTFM.

                       

                      1. The multi-tenant architecture is NEW

                      2. The multi-tenant architecture is new to real-life use in the public domain

                      3. Even simple things (startup, connecting) are done DIFFERENTLY

                       

                      In particular developers new to 12c should read chapters 17 and 18 of the concepts doc (introduction to/overview of the multitenant architecture)

                      http://docs.oracle.com/cd/E16655_01/server.121/e17633/cdbovrvw.htm

                      • 8. Re: Oracle 12c DATA_PUMP_DIR
                        Srini Chavali-Oracle

                        Moved to the export/import forum - pl post future questions in appropriate forum

                        • 9. Re: Oracle 12c DATA_PUMP_DIR
                          Emad Al-Mousa

                          as "rp0428" mentioned,  "

                          The default Data Pump directory object, DATA_PUMP_DIR, does not work with PDBs. You must define an explicit directory object within the PDB that you are exporting or importing."

                           

                          use the following query to check your current defined directories within PDB:

                           

                          SELECT directory_name, directory_path FROM dba_directories;

                           

                          to create a new directory:

                           

                          SQL> CREATE or REPLACE DIRECTORY dpump_dir as '/file system path/';

                           

                          SQL> GRANT READ, WRITE ON DIRECTORY dpump_dir TO DB_USER;

                           

                          where DB_USER is the user that you will use for the export process which should be granted the Role "DATAPUMP_EXP_FULL_DATABASE".

                           

                          Regards,