天天看點

Oracle執行expdp寫入NFS檔案系統提示ORA-39001 ORA-39000 ORA-31641 ORA-27054錯誤

1.執行expdp指令提示ORA-27054錯誤

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

<code>oracle@cwgsdb1:~$ expdp \'/ as sysdba\' directory=dir_dp schemas=hr dumpfile=hr.dmp logfile=hr.log parallel=2</code>

<code> </code> 

<code>Export: Release 11.2.0.4.0 - Production on Thu Oct 25 16:55:06 2018</code>

<code>Copyright (c) 1982, 2011, Oracle and</code><code>/or</code> <code>its affiliates.  All rights reserved.</code>

<code>Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production</code>

<code>With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,</code>

<code>Data Mining and Real Application Testing options</code>

<code>ORA-39001: invalid argument value</code>

<code>ORA-39000: bad dump </code><code>file</code> <code>specification</code>

<code>ORA-31641: unable to create dump </code><code>file</code> <code>"/backup/hr.dmp"</code>

<code>ORA-27054: NFS </code><code>file</code> <code>system where the </code><code>file</code> <code>is created or resides is not mounted with correct options</code>

<code>Additional information: 3</code>

<code>Additional information: 18</code>

2.檢視alert日志資訊

<code>Thu Oct 25 16:55:08 2018</code>

<code>ALTER SYSTEM SET service_names=</code><code>'SYS$SYS.KUPC$C_1_20181025165507.CAMS'</code> <code>SCOPE=MEMORY SID=</code><code>'cams1'</code><code>;</code>

<code>ALTER SYSTEM SET service_names=</code><code>'SYS$SYS.KUPC$C_1_20181025165507.CAMS'</code><code>,</code><code>'SYS$SYS.KUPC$S_1_20181025165507.CAMS'</code> <code>SCOPE=MEMORY SID=</code><code>'cams1'</code><code>;</code>

<code>DM00 started with pid=55, OS </code><code>id</code><code>=17279, job SYS.SYS_EXPORT_SCHEMA_01</code>

<code>WARNING:NFS </code><code>mount</code> <code>of </code><code>file</code> <code>/backup/hr</code><code>.dmp on filesystem </code><code>/backup</code> <code>done</code> <code>with incorrect options:rw,xattr,dev=9640001</code>

<code>WARNING:Expected NFS </code><code>mount</code> <code>options: rsize&gt;=32768,wsize&gt;=32768,hard,</code>

<code>Thu Oct 25 16:55:10 2018</code>

<code>ALTER SYSTEM SET service_names=</code><code>'SYS$SYS.KUPC$S_1_20181025165507.CAMS'</code> <code>SCOPE=MEMORY SID=</code><code>'cams1'</code><code>;</code>

<code>ALTER SYSTEM SET service_names=</code><code>'cams'</code> <code>SCOPE=MEMORY SID=</code><code>'cams1'</code><code>;</code>

3.在MOS上查找解決方案

使用“expdp ORA-27054”關鍵字查找,找到MOS文檔:

ORA-27054: NFS File System Where the File is Created or Resides is Not Mounted With Correct Options (文檔 ID 781349.1)

You are transferring your database/installation to a NetApps NFS mount point.

The following error occurs on database startup:

ORA-01503: CREATE CONTROLFILE failed 

ORA-01565: error in identifying file '/nfs_d04/oasisxx/data/oasis_system.dbf' 

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

The current mount point is mounted as:

rw,bg,rsize=32768,wsize=32768,hard,vers=3,nointr,timeo=600,proto=tcp,suid 0 0

The correct mount point options are being used but they are not in the correct order per oracle docs on correctly mounting NFS mounts for oracle software.

The correct setting should be:

rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp,suid

NOTE:  the location of the parameter 'hard'

NOTE:  As per  , the 'intr' &amp; 'nointr' are deprecated in UEK kernels, as well as Oracle Linux 6. It is harmless to still include it, you will get a notice..

NFS: ignoring mount option: nointr.

Mount the NFS mount point with the recommended options in the exact order specified in oracle documentation.

For example:

# mount -F nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,forcedirectio,nointr,proto=tcp,suid host:/folder1/to1 /folder2/to2

NOTE:  if settings revert back to original settings after remount, check auto-mounter options/settings.  For more info on auto-mounter, please contact the OS vendor.

4.重新挂載NFS檔案

<code>root@cwgsdb1:~</code><code># umount /backup</code>

<code>root@cwgsdb1:~</code><code># mount -F nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3 100.100.100.54:/impbackup /backup</code>

5.結果驗證

16

<code>oracle@cwgsdb1:</code><code>/backup</code><code>$ expdp directory=dir_dp schemas=hr dumpfile=hr.dmp logfile=hr.log parallel=2</code>

<code>Export: Release 11.2.0.4.0 - Production on Thu Oct 25 17:14:26 2018</code>

<code>Username: system </code>

<code>Password: </code>

<code>Starting </code><code>"SYSTEM"</code><code>.</code><code>"SYS_EXPORT_SCHEMA_01"</code><code>:  system/******** directory=dir_dp schemas=hr dumpfile=hr.dmp logfile=hr.log parallel=2 </code>

<code>Estimate </code><code>in</code> <code>progress using BLOCKS method...</code>

<code>Processing object </code><code>type</code> <code>SCHEMA_EXPORT</code><code>/TABLE/TABLE_DATA</code>

<code>Total estimation using BLOCKS method: 448 KB</code>

顯然該問題是由NFS檔案系統未正确挂載引起的,通過添加關鍵參數,重新挂載NFS系統,順利解決Oracle執行expdp寫入NFS檔案系統提示ORA-39001 ORA-39000 ORA-31641 ORA-27054錯誤的問題。

繼續閱讀