一般打patch到后期,光标控制权都会自动释放给用户 , 但有时候打patch到中途或最后编译无效对象的时候,会停滞不前 。 如果是比较明显的错误, 我们可以通过打patch的界面看到, 也可以通过 adctrl 来查看 。 下面是一个例子:
..........
Processing a batch
...: Wed Feb 08 2012 21:33:49
Processing a batch
...: Wed Feb 08 2012 21:33:51
Processing a batch
...: Wed Feb 08 2012 21:33:53
Processing the last batch...: Wed Feb 08 2012 21:33:57
Done updating the checkfile repository...
STOP_TASK: [Running database update commands] [] [Wed Feb 08 2012 21:33:59]
About to turn off bugs with no active actions: Wed Feb 08 2012 21:33:59
Start of adpunb(): Wed Feb 08 2012 21:33:59
Active bugs at start: 1
Bugs turned off: 0
Outer loop iterations: 26143
Actions scanned: 2
End of adpunb(): Wed Feb 08 2012 21:33:59
Done turning off bugs with no active actions: Wed Feb 08 2012 21:33:59
Done running SQL scripts and EXEC commands.
STOP_TASK: [Run SQL scripts and EXEC commands] [] [Wed Feb 08 2012 21:34:00]
STRT_TASK: [Compile invalid objects in DB] [] [Wed Feb 08 2012 21:34:00]
Compiling invalid objects...
STRT_TASK: [Run ST parallel compile (APPS)] [] [Wed Feb 08 2012 21:34:00]
sqlplus -s APPS/***** @/data/d1/sit/applsit/apps/apps_st/appl/ad/12.0.0/sql/adutlrcmp.sql APPLSYS ***** APPS ***** ***** 8 0 NONE FALSE
Connected.
Arguments are:
AOL_schema = APPLSYS, AOL_password = *****,
Schema_to_compile = APPS, Schema_to_compile_pw = *****,
SYSTEM_password = *****, Total_workers = 8, Logical_worker_num = 0
Object_type_to_not_compile = NONE
Use_stored_dependencies = FALSE
Connected.
Running utl_recomp.recomp_parallel(8), if it exists
OWNER NUM_INVALID
------------------------------ -----------
PUBLIC 774
MSC 2
APPLSYSPUB 1
ICARE_ICARE BI 4005
APPS 40899
DMSYS 10
6 rows selected.
Elapsed: 00:00:00.32
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.02
STATUS_MESSAGE
------------------------------------------------------------------------------
Running UTL_RECOMP.RECOMP_PARALLEL...
Processing a batch
...: Wed Feb 08 2012 21:33:49
Processing a batch
...: Wed Feb 08 2012 21:33:51
Processing a batch
...: Wed Feb 08 2012 21:33:53
Processing the last batch...: Wed Feb 08 2012 21:33:57
Done updating the checkfile repository...
STOP_TASK: [Running database update commands] [] [Wed Feb 08 2012 21:33:59]
About to turn off bugs with no active actions: Wed Feb 08 2012 21:33:59
Start of adpunb(): Wed Feb 08 2012 21:33:59
Active bugs at start: 1
Bugs turned off: 0
Outer loop iterations: 26143
Actions scanned: 2
End of adpunb(): Wed Feb 08 2012 21:33:59
Done turning off bugs with no active actions: Wed Feb 08 2012 21:33:59
Done running SQL scripts and EXEC commands.
STOP_TASK: [Run SQL scripts and EXEC commands] [] [Wed Feb 08 2012 21:34:00]
STRT_TASK: [Compile invalid objects in DB] [] [Wed Feb 08 2012 21:34:00]
Compiling invalid objects...
STRT_TASK: [Run ST parallel compile (APPS)] [] [Wed Feb 08 2012 21:34:00]
sqlplus -s APPS/***** @/data/d1/sit/applsit/apps/apps_st/appl/ad/12.0.0/sql/adutlrcmp.sql APPLSYS ***** APPS ***** ***** 8 0 NONE FALSE
Connected.
Arguments are:
AOL_schema = APPLSYS, AOL_password = *****,
Schema_to_compile = APPS, Schema_to_compile_pw = *****,
SYSTEM_password = *****, Total_workers = 8, Logical_worker_num = 0
Object_type_to_not_compile = NONE
Use_stored_dependencies = FALSE
Connected.
Running utl_recomp.recomp_parallel(8), if it exists
OWNER NUM_INVALID
------------------------------ -----------
PUBLIC 774
MSC 2
APPLSYSPUB 1
ICARE_ICARE BI 4005
APPS 40899
DMSYS 10
6 rows selected.
Elapsed: 00:00:00.32
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.02
STATUS_MESSAGE
------------------------------------------------------------------------------
Running UTL_RECOMP.RECOMP_PARALLEL...
应该是打patch的最后一步了, 执行adutlrcmp.sql 编译patch安装中无效数据库对象,从log看,目前你apps schema下有40899个, 可以隔段时候用 dba用户连到数据库上,执行以下的sql看看非法对象有没有变少,
select owner, count(*) tsum from dba_objects where status <> 'VALID' group by owner;
select owner, count(*) tsum from dba_objects where status <> 'VALID' group by owner;
如果机器配置不高(内存小于4G), PGA小于2G ,跑起来会比较慢。 通常会建议打这个升级包前,修改 $RDBMS_ORACLE_HOME/dbs/init.ora 文件,把SGA和PGA的参数调到至少2G, 再加上下面一
条参数 _disable_fast_validate=TRUE 。
打好patch后,再把上面新加的参数注掉就行了, 如果你现在不想等,可以中止当前的 patch进程,修
改参数,重启DB, 再次adpatch的时候会提示是否继续当前的patch, 可以选择继续当前的 patch进程即可。
本文转自ITPUB博客tolywang的博客,原文链接:Oracle EBS R12.1.3 打patch出现hang住的现象如何解决,如需转载请自行联系原博主。