11 Replies Latest reply: Apr 27, 2013 8:04 AM by Paul M. RSS

    expdp error

    pawii
      i am using oel 5.5 with oracle 10g release 2 installed on it

      i am using datapump for database backup purpose
      i fired these command as follows

      _[oracle@neeraj Desktop]$ sqlplus / as sysdba_

      SQL*Plus: Release 10.2.0.1.0 - Production on Sat Apr 27 14:54:46 2013

      Copyright (c) 1982, 2005, Oracle. All rights reserved.


      Connected to:
      Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
      With the Partitioning, OLAP and Data Mining options

      _SQL> create directory dir2 as '/u01/app/abcd';_

      Directory created.

      SQL> grant read,write on directory dir2 to hr;_

      Grant succeeded.

      SQL> exit
      Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr oduction
      With the Partitioning, OLAP and Data Mining options

      _*[oracle@neeraj Desktop]$ expdp hr/hr dumpfile=hr.dmp directory=dir2 schemas=hr*_

      Export: Release 10.2.0.1.0 - Production on Saturday, 27 April, 2013 14:56:19

      Copyright (c) 2003, 2005, Oracle. All rights reserved.

      Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc tion
      With the Partitioning, OLAP and Data Mining options
      ORA-39002: invalid operation
      ORA-39070: Unable to open the log file.
      ORA-29283: invalid file operation
      ORA-06512: at "SYS.UTL_FILE", line 475
      ORA-29283: invalid file operation


      so what is wrong with this??
        • 1. Re: expdp error
          Paul M.
          i am using datapump for database backup purpose
          Is yours a production database ?
          SQL> create directory dir2 as '/u01/app/abcd';

          ORA-39070: Unable to open the log file.
          Looks like a permissions problem. Please post the result of
          $ cd /u01/app/abcd
          $ ls -la
          • 2. Re: expdp error
            saratpvv
            1. Check whether the mount point /u01/app/abcd interface was available in the Oracle database machine.
            2. Check if there’s any directory permission problem by creating a file manually from the shell of Oracle database machine.
            • 3. Re: expdp error
              pawii
              no there is no directory cd /u01/app/abcd but the statement succeeded
              so why there is no directory?/
              • 4. Re: expdp error
                saratpvv
                Did you create the directory ?
                like
                $mkdir abcd

                You need to give the premission : chmod 777 to abcd directory
                $chmod 777 abcd
                • 5. Re: expdp error
                  pawii
                  i manually created directory using mkdir -p on oracle prompt
                  • 6. Re: expdp error
                    pawii
                    why should i had to create directory using mkdir??
                    is create directory dir1 as /u01/app/abcd is not enough??

                    or we had to always create directory using mkdir??
                    • 7. Re: expdp error
                      Justin_Mungal
                      pawii wrote:
                      why should i had to create directory using mkdir??
                      is create directory dir1 as /u01/app/abcd is not enough??

                      or we had to always create directory using mkdir??
                      Oracle doesn't actually create a directory at the OS-level. It creates a directory object in the database. An OS-level directory and an Oracle directory are not synonymous.
                      • 8. Re: expdp error
                        %bala%
                        why should i had to create directory using mkdir??
                        is create directory dir1 as /u01/app/abcd is not enough??
                        create directory dir1 - this command will create a logical directory object at database level. It will not create directory at OS level.
                        at OS level, you have to create directory manually.

                        Edited by: %bala% on Apr 27, 2013 3:59 PM

                        Edited by: %bala% on Apr 27, 2013 4:01 PM
                        • 9. Re: expdp error
                          saratpvv
                          I generally use to create the directory in mount point and granting premission 777 to it

                          Edited by: saratpvv on Apr 27, 2013 3:58 PM
                          • 10. Re: expdp error
                            Srini Chavali-Oracle
                            Pl be aware that exports are not backups. For true backups, you should use RMAN

                            http://docs.oracle.com/cd/B19306_01/backup.102/b14192/strategy003.htm#sthref167
                            http://docs.oracle.com/cd/B19306_01/backup.102/b14192/intro010.htm

                            HTH
                            Srini
                            • 11. Re: expdp error
                              Paul M.
                              pawii wrote:
                              no there is no directory cd /u01/app/abcd but the statement succeeded
                              so why there is no directory?/
                              See CREATE DIRECTORY, where you can read

                              For file storage, you must also create a corresponding operating system directory, an ASM disk group, or a directory within an ASM disk group. Your system or database administrator must ensure that the operating system directory has the correct read and write permissions for Oracle Database processes.

                              Privileges granted for the directory are created independently of the permissions defined for the operating system directory, and the two may or may not correspond exactly. For example, an error occurs if sample user hr is granted READ privilege on the directory object but the corresponding operating system directory does not have READ permission defined for Oracle Database processes.



                              But you didn't answer my question : is yours a production database ? if so, and datapump is your only backup strategy, do your users know that they'll lose all their transactions made after the export, in case of import of the dump file ?