今天在将一个数据库从9204升级到9206时候(p3948480_9206_HP64),遇到一个报错:
1 2 3 4 5 6 7 8 9 |
Exception String: Error in writing to file '/oracle/app/oracle/product/9.2.0/lib32/libwtc9.sl'. [/oracle/app/oracle/product/9.2.0/lib32/libwtc9.sl (Text file busy)] Exception Severity: 2 Exception handling set to prompt user with options to Retry Ignore User Choice: Retry Exception thrown from action: copyGroupFromJar Exception Name: IOException2 Exception String: Error in writing to file '/oracle/app/oracle/product/9.2.0/lib32/libwtc9.sl'. [/oracle/app/oracle/product/9.2.0/lib32/libwtc9.sl (Text file busy)] Exception Severity: 2 Exception handling set to prompt user with options to Retry Ignore |
奇怪,按理说数据库的侦听已经停了,且数据库已经重启过,应该不会还有应用会使用数据库中的文件了吧?在图形界面点击retry,可以继续安装,但是不一会又再次弹出窗口说这个文件还是在被使用。
此时,我们可以用fuser这个命令来查看是哪个进程在使用这个文件。
1 2 |
sn_rdb01#[/]fuser /oracle/app/oracle/product/9.2.0/lib32/libwtc9.sl /oracle/app/oracle/product/9.2.0/lib32/libwtc9.sl: 5757m 5759m 5758m 6585m 6605m 5756m 5755m 6607m 5760m 6632m 6565m 6560m 18407m 6633m |
继续检查这些是什么进程:
1 2 3 4 5 6 7 8 |
sn_rdb01#[/]ps -ef |grep 5757 report16 5757 1 0 Feb 13 ? 56:19 datastat_mms root 27653 24491 0 23:12:57 pts/3 0:00 grep 5757 sn_rdb01#[/] sn_rdb01#[/] sn_rdb01#[/]ps -ef |grep 5759 report16 5759 1 0 Feb 13 ? 5:20 dataload_sms root 27714 24491 0 23:14:31 pts/3 0:00 grep 5759 |
经检查,这些进程是报表应用的进程,可以用kill的方式杀掉这些进程,我们在这里采用了更为安全的方式:通知报表的维护人员停了报表应用。停完后,顺利升级!