您的位置:首页 > 数据库 > Oracle

oracle for windows使用NFS远程备份报错之O/S-Error: (OS 1326)

2017-12-20 09:09 441 查看
测试windows数据库服务器版本:windows server 2012R2

测试windows NFS服务器版本:windows server 2008R2

测试oracle数据库版本:oracle 11.2.0.1

问题描述:在win2008服务器上创建共享文件夹,设置共享权限是everyone有完全控制权限,在win2012R2上挂载win2008R2的共享文件夹

让oracle数据库执行远程备份即通过NFS方式从windows2012R2备份到远程机器windows2008R2机器上。当windows 2008R2服务器与windows

2012R2服务器的windows密码不一致(或者是2台服务器的administrator的密码不一致)时,oracle使用nfs进行expdp或者rman远程备份时报错:

C:\Users\Administrator>rman target /

恢复管理器: Release 11.2.0.1.0 - Production on 星期二 12月 19 22:18:10 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

连接到目标数据库: ORCL (DBID=1489232098)

RMAN> backup current controlfile format '\192.168.49.142\orabak\orcl.ctrl';

启动 backup 于 19-12月-17
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 正在启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
备份集内包括当前控制文件
通道 ORA_DISK_1: 正在启动段 1 于 19-12月-17
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: backup 命令 (ORA_DISK_1 通道上, 在 12/19/2017 22:19:41 上) 失败
ORA-19504: 无法创建文件"\192.168.49.142\ORABAK\ORCL.CTRL"
ORA-27040: 文件创建错误, 无法创建文件
OSD-04002: 无法打开文件
O/S-Error: (OS 1326) 用户名或密码不正确。

RMAN>

expdp执行报错:

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 12月 19 22:32:03 2017

Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create directory zhul as '\192.168.49.142\orabak';

目录已创建。

SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开

C:\Users\Administrator>expdp \"/ as sysdba\" directory=zhul schemas=scott dumpfile=expdp_scott.dmp logfile=expdp_soctt.log

Export: Release 11.2.0.1.0 - Production on 星期二 12月 19 22:33:27 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: 操作无效
ORA-39070: 无法打开日志文件。
ORA-29283: 文件操作无效
ORA-06512: 在 "SYS.UTL_FILE", line 536
ORA-29283: 文件操作无效

C:\Users\Administrator>

但是,当两台服务器的windows密码或者administrator保持一致时,oracle使用nfs进行远程expdp或者rman备份时可以顺利进行。

C:\Users\Administrator>rman target /

恢复管理器: Release 11.2.0.1.0 - Production on 星期二 12月 19 22:40:00 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

连接到目标数据库: ORCL (DBID=1489232098)

RMAN> backup current controlfile format '\192.168.49.142\orabak\orcl_ctrl.ora';

启动 backup 于 19-12月-17
使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=131 设备类型=DISK
通道 ORA_DISK_1: 正在启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
备份集内包括当前控制文件
通道 ORA_DISK_1: 正在启动段 1 于 19-12月-17
通道 ORA_DISK_1: 已完成段 1 于 19-12月-17
段句柄=\192.168.49.142\ORABAK\ORCL_CTRL.ORA 标记=TAG20171219T224050 注释=NONE
通道 ORA_DISK_1: 备份集已完成, 经过时间:00:00:01
完成 backup 于 19-12月-17

RMAN>

C:\Users\Administrator>expdp \"/ as sysdba\" directory=zhul schemas=scott dumpfile=expdp_scott.dmp logfile=expdp_soctt.log

Export: Release 11.2.0.1.0 - Production on 星期二 12月 19 22:41:51 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 "SYS"."SYS_EXPORT_SCHEMA_02": "/**** AS SYSDBA" directory=zhul schemas=scott dumpfile=expdp_scott.dmp logfile=expdp_soctt.log
正在使用 BLOCKS 方法进行估计...
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 192 KB
处理对象类型 SCHEMA_EXPORT/USER
处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE
处理对象类型 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE
处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/INDEX
处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
处理对象类型 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . 导出了 "SCOTT"."DEPT" 5.937 KB 4 行
. . 导出了 "SCOTT"."EMP" 8.570 KB 14 行
. . 导出了 "SCOTT"."SALGRADE" 5.867 KB 5 行
. . 导出了 "SCOTT"."BONUS" 0 KB 0 行
已成功加载/卸载了主表 "SYS"."SYS_EXPORT_SCHEMA_02"

SYS.SYS_EXPORT_SCHEMA_02 的转储文件集为:
\192.168.49.142\ORABAK\EXPDP_SCOTT.DMP
作业 "SYS"."SYS_EXPORT_SCHEMA_02" 已于 22:42:46 成功完成
C:\Users\Administrator>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  windows oracle NFS