Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2625522
  • 博文数量: 323
  • 博客积分: 10211
  • 博客等级: 上将
  • 技术积分: 4934
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-27 14:56
文章分类

全部博文(323)

文章存档

2012年(5)

2011年(3)

2010年(6)

2009年(140)

2008年(169)

分类: Oracle

2008-03-25 14:16:24

转一篇朱老大写的文章,虽然平时很难遇到,但很有参考价值。
 

原来在对PROD或者DEV 的patch 进行安装时,肯定要提前都做好详细的操作计划书,再通过国外的DBA “大毛”检查后,
才能去PROD或者DEV 上去做,所以,基本上没机会出现下面类似错误。

近来心情郁闷,懒呆去干活。忽然有个想法,
假如把ADPATCH 的"c", "d", "g" driver 的顺序改一下去ADPATCH 的话,会出现什么后果呢?
于是就去自己的实验PC上做实验,当然是出了不小的问题,解决过程如下,供大家参考!

警告:千万不要在PROD 或者DEV 的环境中去测试,否则,出现什么后果将和本人无任何关系

I. patch drivers 介绍 (摘自METALINK)

"c" driver, to copy software to respective directories and do a variety of tasks.
"d" driver, which delivers information to the database. The d driver is only present if there are database updates.
"g" driver, which delivers forms, reports, and concurrent processes.
Only present if the patch delivers form server updates.

The drivers are all executed using ADPATCH, and the drivers should be
applied in "c", "d", "g" order.

II.改变“c”,“d” 顺序,做实验。(以2451368 patch 为例)
- 停掉CM(并发管理器) adcmctl stop apps/apps
- adadmin 修改 enable mantiance model
- adpatch
正常的情况下,应该是
提示输入system 密码/APPLSYS 的密码,
The default directory :D:oraclepatch2451368
Please enter the name of your AutoPatch driver file : c2451368.drv (在此步骤中输入c2451368.drv)
为了做实验,我没有输入c2451368.drv,而是输入了d2451368.drv
最终的结果,出现如下的错误

one reading jobs from FND_INSTALL_PROCESSES table ...

Telling workers to read 'todo' restart file.
Done.

ATTENTION: All workers either have failed or are waiting:

FAILED: file arhmgmul.sql on worker 1.

ATTENTION: Please fix the above failed worker(s) so the manager can continue.


Telling workers to quit...

1 worker has quit. Waiting for 1 more.

III. 分析:

从上面的错误日志,表面看好象是worker 出问题了,于是乎,把起来的WORKER 停掉并重新启动,

D:oraclezhucomnadminscriptsZHU_oratest>adctrl

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

AD Controller

Version 11.5.0

此处省略了很多。。。
....................................................
...................................................

Enter the ORACLE username of Application Object Library [APPLSYS] :

Enter the ORACLE password of Application Object Library [APPS] : apps

......................................................



AD Controller Menu
---------------------------------------------------

1. Show worker status

2. Tell worker to restart a failed job

3. Tell worker to quit

4. Tell manager that a worker failed its job

5. Tell manager that a worker acknowledges quit

6. Restart a worker on the current machine

7. Exit



Enter your choice [1] : 3

Enter the worker number(s)/range(s) or 'all' for all workers,
or press [Return] to go back to the menu : all

Control code changed to 'Quit' for worker 1.
Control code changed to 'Quit' for worker 2.
Control code changed to 'Quit' for worker 3.
Control code changed to 'Quit' for worker 4.
Control code changed to 'Quit' for worker 5.
Control code changed to 'Quit' for worker 6.
Review the messages above, then press [Return] to continue.

IV. 再试 着去打2451368 patch
cd D:oraclepatch2451368
adpatch 回车后,没有任何提示输入什么密码/路径/名字,而是直接到了最后如下的错误
Telling workers to read 'todo' restart file.
Done.

ATTENTION: All workers either have failed or are waiting:

FAILED: file arhmgmul.sql on worker 1.

ATTENTION: Please fix the above failed worker(s) so the manager can continue.


经过反复几次,都是同样的结果,看来,真的出问题了,需要想办法解决了,于是开始查资料,上METALINK /itpub 等,寻找相似的解决方法

IIV. 解决方法:(参考的METALINK:175485.1)
1. Using the adctrl utility, shutdown the workers.
a. adctrl
b. Select option 3 "Tell worker to shutdown/quit"
2. Backup the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema
a. sqlplus applsys/
b. create table fnd_Install_processes_back
as select * from fnd_Install_processes;
c. The 2 tables should have the same number of records.
select count(*) from fnd_Install_processes_back;
select count(*) from fnd_Install_processes;
3. Backup the AD_DEFERRED_JOBS table.
a. sqlplus applsys/
b. create table AD_DEFERRED_JOBS_back
as select * from AD_DEFERRED_JOBS;
c. The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_back;
select count(*) from AD_DEFERRED_JOBS;
4. Backup the .rf9 files located in $APPL_TOP/admin//restart directory.
At this point, the adpatch session should have ended and the cursor should
be back at the Unix prompt.
a. cd $APPL_TOP/admin/
b. mv restart restart_back
c. mkdir restart
5. Drop the FND_INSTALL_PROCESSES table and the AD_DEFERRED_JOBS table.
a. sqlplus applsys/
b. drop table FND_INSTALL_PROCESSES;
c. drop table AD_DEFERRED_JOBS;
6. Reapply the patch 2451368
- adpatch 回车后,都按DEFAULT 的输入,
在Please enter the name of your AutoPatch driver file : c2451368.drv(此方法是正常的方法)
一路下来,没报任何错误,
- 再次运行adpatch 回车后,都按DEFAULT 的输入
在Please enter the name of your AutoPatch driver file : d2451368.drv
一路下来,没报任何错误,
哈哈。。这样patch 就打成功了。。

7. Restore the .rf9 files located in $APPL_TOP/admin//restart_back
directory.
a. cd $APPL_TOP/admin/
b. mv restart restart_
c. mv restart_back restart
8. Restore the FND_INSTALL_PROCESSES table which is owned by the APPLSYS
schema.
a. sqlplus applsys/
b. create table fnd_Install_processes
as select * from fnd_Install_processes_back;
c. The 2 tables should have the same number of records.
select count(*) from fnd_Install_processes;
select count(*) from fnd_Install_processes_back;
9. Restore the AD_DEFERRED_JOBS table.
a. sqlplus applsys/
b. create table AD_DEFERRED_JOBS
as select * from AD_DEFERRED_JOBS_back;
c. The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_back;
select count(*) from AD_DEFERRED_JOBS;
10. Re-create synonyms
a. sqlplus apps/apps
b. create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;
c. create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;
11. adadmin 中 disable mantaince model 修改
12. 启动CM(并发管理器) adcmctl start apps/apps

阅读(2191) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~