This discussion is archived
1 2 3 Previous Next 31 Replies Latest reply: Sep 10, 2013 1:16 PM by Mark Pura Go to original post RSS
  • 15. Re: Weird expdp error - Unable to lock file.
    Actitud Newbie
    Currently Being Moderated
    SQL> select table_name from user_tables;

    TABLE_NAME
    - - - - - - - - - -
    TEST_TABLE

    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    hydrogen@/u02/expdp/dbname> sqlplus dpuser/dpuser;
    hydrogen@/u02/expdp/dbname> expdp dpuser/dpuser DIRECTORY=DATAPUMP tables=TEST_TABLE dumpfile=mytable.dmp logfile=mytable.log;

    Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 23 April, 2009 9:58:09

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

    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-31641: unable to create dump file "/u02/expdp/dbname/mytable.dmp"
    ORA-27086: unable to lock file - already in use
    Linux-x86_64 Error: 13: Permission denied
    Additional information: 9
    Additional information: 13

    hydrogen@/u02/expdp/dbname> ls -l
    -rw-rw-r-- 1 oracle dba 593 Apr 23 09:55 mytable.log
    -rw-rw---- 1 oracle dba 4.0K Apr 23 09:55 mytable.dmp

    *Same error. Also, I've granted dba_ privileges to dpuser just in case but nothing changes.*
    Thanks.
    Alex.
  • 16. Re: Weird expdp error - Unable to lock file.
    26741 Oracle ACE
    Currently Being Moderated
    Try using a directory name other than DATAPUMP ?

    Name the directory "DP" in Oracle ?
  • 17. Re: Weird expdp error - Unable to lock file.
    Actitud Newbie
    Currently Being Moderated
    No. This is the disk I'm using.

    Filesystem Size Used Avail Use% Mounted on
    f2fds1:/nas/FDSDisk-00001/fds/expdp
    573G 269M 573G 1% /u02/expdp

    Thanks.
    Alex.

    Edited by: Actitud on Apr 23, 2009 12:07 PM
  • 18. Re: Weird expdp error - Unable to lock file.
    695939 Newbie
    Currently Being Moderated
    Entering DIRECTORY=dirobj1 and DUMPFILE=dirobj2:file.dmp should be perfectly fine to do. The file.dmp will be created in the directory pointed to dirobj2 (even if dirobj1 and dirobj2 are the same).

    John
  • 19. Re: Weird expdp error - Unable to lock file.
    Actitud Newbie
    Currently Being Moderated
    I've tried that too.

    Thanks.
    Alex.
  • 20. Re: Weird expdp error - Unable to lock file.
    26741 Oracle ACE
    Currently Being Moderated
    Is the destination directory (OS level) local or an NFS mount point ?
    Try using a local mount point (try /tmp or /usr/tmp) ?
  • 21. Re: Weird expdp error - Unable to lock file.
    Actitud Newbie
    Currently Being Moderated
    Hello Hermant.

    I tried that just now and I'm getting the same issue.

    Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 23 April, 2009 10:11:23

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

    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-31641: unable to create dump file "/u02/expdp/dbname/new_dir/new.dmp"
    ORA-27086: unable to lock file - already in use
    Linux-x86_64 Error: 13: Permission denied
    Additional information: 9
    Additional information: 13

    Thanks.
    Alex.
  • 22. Re: Weird expdp error - Unable to lock file.
    26741 Oracle ACE
    Currently Being Moderated
    I was suggesting a directory other than /u02/expdp.

    However, just verify the permissions on /u02 and /u02/expdp and /u02/expdb/dbname as well -- permissions on each, seperately, with "ls -la"
  • 23. Re: Weird expdp error - Unable to lock file.
    Actitud Newbie
    Currently Being Moderated
    Bingo!

    It was something related to the NFS mount.

    I supposed that before but after some research I couldn't find any problem between nfs and expdp.

    BTW. The privileges are the same on the new directory (LOCAL) and in the old one (NFS).

    There shouldn't be any issue trying to expdp into NFS device. Now I have to solve this out since I have many databases and the NFS device was supposed to be the directory for all the databases.

    Thanks Hermant!.

    Alex.
  • 24. Re: Weird expdp error - Unable to lock file.
    26741 Oracle ACE
    Currently Being Moderated
    I remember that when 10g RMAN came out, it was very particular about NFS mount point parameters. A few Bugs and MetaLink notes were also logged.
    Since expdp is a Server program (like RMAN) unlike exp which is a Client program (like SQLPlus), it is possible, that it, too, is sensitive. However, those errors you had seem to be Linux "permissions" errors which could be misleading (or could be expdp retrying "open file" just because it can't handle NFS ?) ?? !

    Worth exploring with an SR with Oracle Support.
  • 25. Re: Weird expdp error - Unable to lock file.
    770125 Newbie
    Currently Being Moderated
    I have a 11.1.0.6 on RH linux 2.6.18-92.1.10.0.1.el5 #1 SMP and got the same error:

    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    ;;;
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39000: bad dump file specification
    ORA-31641: unable to create dump file "/chidatad1/ORACLEDB1/dpdump/Account.dmp"
    ORA-27086: unable to lock file - already in use
    Linux-x86_64 Error: 13: Permission denied
    Additional information: 9
    Additional information: 13


    Tried to mount the nfs with the following option as many have suggested but still got the error:

    mount -t nfs -o rw,rsize=32768,wsize=32768,tcp,hard,nointr,nfsvers=3,bg,actimeo=0,timeo=600,suid,async chidatad1:/backup/chioradb1 /chidatad1

    Just wonder what is the final solution?

    Thanks.

    Edited by: dhe on Jun 2, 2010 11:44 AM
  • 26. Re: Weird expdp error - Unable to lock file.
    Luckylucky Newbie
    Currently Being Moderated
    One ultimate solution is try

    expdp dpuser/dpuser full=y DIRECTORY=datapump DUMPFILE=datapump:test%u.dmp logfile=datapump:test1.log;

    or

    expdp dpuser/dpuser full=y DIRECTORY=datapump DUMPFILE=datapump:test1.dmp logfile=datapump:test1.log;
  • 27. Re: Weird expdp error - Unable to lock file.
    895002 Newbie
    Currently Being Moderated
    HI Alex,

    I am also facing same issue, i.e able to take EXPDP in local path but not of NFS Mount directory.

    Could you please let me know the solution you have found out?

    My Oracel version is 10.2.0.3.0.

    Thanks,
    Krina

    Edited by: user4475134 on 18-Oct-2011 03:21
  • 28. Re: Weird expdp error - Unable to lock file.
    artwin Newbie
    Currently Being Moderated
    I've also stumbled across this problem. To solve this you need to start nfslock service

    +$ /etc/init.d/nfslock start+

    if this does not help, you remount the share with nolock option to omit locking

    +$ umount /u02+
    +$ mount -o nolock /u02+
  • 29. Re: Weird expdp error - Unable to lock file.
    user9953004 Newbie
    Currently Being Moderated
    After testing many mount options, the most direct and minmial solution is to mount the NFS with options "*nolock,noac*". These are the minimum number of additional mount options needs to make expdp exports work.

    You can do this from command line;

    # mount -o nolock,noac <+servername+>:/<+share+> /<+local mount point+>

    You can also set these option in fstab or other places the mount options can be used. Here is an autofs example;

    /etc/auto.master -

    /net     -hosts -fstype=nfs,rw,nolock,noac

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points