[分享]在windows上应用补丁时,文件使用错误_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3890 | 回复: 0   主题: [分享]在windows上应用补丁时,文件使用错误        下一篇 
薯片
注册用户
等级:中士
经验:237
发帖:75
精华:0
注册:2012-2-10
状态:离线
发送短消息息给薯片 加好友    发送短消息息给薯片 发消息
发表于: IP:您无权察看 2012-2-10 16:51:41 | [全部帖] [楼主帖] 楼主

适用于:

oracle服务器 - 企业版 - 版本:9.2.0.1到11.1.0.7
微软Windows2000
微软Windows Server2003
微软的Windows Server 2003(64位AMD64和Intel EM64T)
微软Windows
微软Windows(32位)
微软windows XP

症状

这种类型的错误发生在使用opatch实用工具应用一个临时的补丁时,或者发生在使用setup.exe实用程序应用补丁集时。
还会出现一些文件不能被复制的错误,一般,这些文件都是DLL文件。
一个典型的错误消息:(注:这只是一个例子。目录名,文件名和文件数量可以是不同的)。

==========================================================
OPatch encounters the following issues during file patching:
The following files had problems with being patched:
1. d:\oracle\product\920\bin\oracore9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oracore9.dll to
d:\oracle\product\920\bin\oracore9.dll from D:/TEMP/5654905. ]
2. d:\oracle\product\920\bin\orannzsbb9.dll
[ Couldn't copy d:\temp\5654905\files\bin\orannzsbb9.dll to
d:\oracle\product\920\bin\orannzsbb9.dll from D:/TEMP/5654905. ]
3. d:\oracle\product\920\bin\oraxml9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oraxml9.dll to
d:\oracle\product\920\bin\oraxml9.dll from D:/TEMP/5654905. ]
4. d:\oracle\product\920\bin\orageneric9.dll
[ Couldn't copy d:\temp\5654905\files\bin\orageneric9.dll to
d:\oracle\product\920\bin\orageneric9.dll from D:/TEMP/5654905. ]
5. d:\oracle\product\920\bin\oranmsp.dll
[ Couldn't copy d:\temp\5654905\files\bin\oranmsp.dll to
d:\oracle\product\920\bin\oranmsp.dll from D:/TEMP/5654905. ]
6. d:\oracle\product\920\bin\oracommon9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oracommon9.dll to
d:\oracle\product\920\bin\oracommon9.dll from D:/TEMP/5654905. ]
7. d:\oracle\product\920\bin\oranls9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oranls9.dll to
d:\oracle\product\920\bin\oranls9.dll from D:/TEMP/5654905. ]
8. d:\oracle\product\920\bin\oran9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oran9.dll to
d:\oracle\product\920\bin\oran9.dll from D:/TEMP/5654905. ]
9. d:\oracle\product\920\bin\oranro9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oranro9.dll to
d:\oracle\product\920\bin\oranro9.dll from D:/TEMP/5654905. ]
10. d:\oracle\product\920\bin\orapls9.dll
[ Couldn't copy d:\temp\5654905\files\bin\orapls9.dll to
d:\oracle\product\920\bin\orapls9.dll from D:/TEMP/5654905. ]
11. d:\oracle\product\920\bin\orasql9.dll
[ Couldn't copy d:\temp\5654905\files\bin\orasql9.dll to
d:\oracle\product\920\bin\orasql9.dll from D:/TEMP/5654905. ]
12. d:\oracle\product\920\bin\oraldapclnt9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oraldapclnt9.dll to
d:\oracle\product\920\bin\oraldapclnt9.dll from D:/TEMP/5654905. ]
13. d:\oracle\product\920\bin\oraclient9.dll
[ Couldn't copy d:\temp\5654905\files\bin\oraclient9.dll to
d:\oracle\product\920\bin\oraclient9.dll from D:/TEMP/5654905. ]
Replying 'Y' will terminate the patch installation immediately. It WILL
NOT restore any updates that have been performed to this point. It WILL
NOT update the inventory.
Replying 'N' will update the inventory showing the patch has been applied.
NOTE: After replying either 'Y' or 'N' it is critical to review:
Metalink Note > How to rollback a failed Interim patch installation.
Do you want to STOP?
Please respond Y|N >
Y
File Patching Error!
ERROR: OPatch failed during patching, possibly due to missing files.


原因

Oracle文件正在使用时,会发生此错误。
当一个文件正在使用时,Windows不会允许这个文件被覆盖。

解决方案

- 确保已停止所有Oracle服务。
- 检查,看看是否有一个名为“分布式事务处理协调”服务正在运行。

- 如果是这样,停止它。
- 尝试再次应用该修补程序。

如果得到同样的错误,那么就意味着一些其他的应用程序/服务正在使用Oracle文件。

有一个简单的解决方法:
- 机器启动到安全模式。
- 应用补丁。
- 应用修补程序后,重新启动回到正常模式。
-通过使用快速安装程序,完成应用补丁。

其他可行的解决方法:
从path变量中删除oracle,重新启动机器,应用修补程序,然后把oracle重新放回PATH变量中。

建议步骤:
- 所有Oracle服务设为手动启动(标志哪些是用这种方式设置,这样就可以
把他们改回来)。
- 编辑系统环境变量。
- 复制整个路径到一个txt文本文件中(供以后使用)。
- 从路径中删除Oracle目录。
- 重新启动机器。
- 应用补丁。
- 恢复成原来的oracle路径(使用之前的txt文本文件)。
- 设置Oracle服务自动启动(只设置之前为自动启动的服务)。
- 重新启动机器。
-用快速安装程序(即脚本)完成应用补丁。

一些报道说,一个应用程序如病毒检查,备份软件,硬盘维护,和其他类似的应用程序,在一些Oracle文件上加了锁。
如果想应用补丁,您可能需要禁用这些程序。
请参阅下一节,以帮助确定哪些进程/程序锁定了文件。

使用一个工具,以确定哪些进程正在使用Oracle文件。
- 这样的工具被称为Process Explorer。
- 你可以从这个网站:http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx找到
- 一旦安装,搜索Oracle的dll文件。
- 当你发现正在使用这些文件的进程,你可以终止该进程。
- 然后尝试应用修补程序。

如果上述步骤都试过了,你仍然得到复制文件的错误:
请检查在补丁绑定文件或者>br> in the Oracle_Home中“只读”属性是否被设置。

(注:当有80+的文件不能复制时,就很好地说明了出现了这个问题)。


一个常见的原因是,补丁包放到了CD-ROM,然后被复制到本地磁盘;或者,有人故意设置了Oracle文件的只读属性。

要检查“只读”属性,您可以:
- 使用Windows Explorer
- 进入目录(补丁目录,或ORACLE_HOME)
- 右击一个文件
(使用opatch Apply.log,以确定文件名或文件夹。)
- 选择“属性”
- 你可以看到是否设置了只读属性。
如果设置了只读属性,你需要将其去掉:
- 打开一个CMD提示符。
- 进入目录(补丁目录或ORACLE_HOME)。
- 键入:attrib -r *.* /s。

(此命令将去掉所有文件和所有子文件夹的“只读”属性)。


现在,尝试应用修补程序。




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论