首页 » ORACLE » hpux psu 10.2.0.4.12 遇到的一些小问题

hpux psu 10.2.0.4.12 遇到的一些小问题

XX电信就是一个急性子,上午决定升级晚上就要实施,下面记录一下HPUX IA64 10.2.0.4.0 PSU 到10.2.0.4.12时遇到的一些小问题, 那些非常归安装的人确实让人讨厌。
10.2.0.4..0 到 10.2.0.4.12 中间要先到10.2.0.4.4。

# 检查数据库的无效对象和组件状态,排除是因升级造成的
select comp_name,version,status,schema from dba_registry;

select owner,object_type ,count(*) from dba_objects where status<>’VALID’ group by owner,object_type;
# 检查当前版本
[oracle@hbodsdbb:/ora10g/app/oracle/product/db10g/OPatch]#opatch lsinventory
# backup ORACLE software

[oracle@hbodsdba:/bonc]#tar cvf oracle10204.tar -C /ora10g/app/oracle/product .

#stop listener

lsnrctl stop

#stop session

[oracle@hbodsdba:/ora10g]#ps -ef|grep NO|grep -v grep |awk ‘{print $2}’|xargs kill -9

# stop database

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
猜测这机器的ORACLE软件是tar过来的.

opatch apply 第一个错误

OPatch cannot find a valid oraInst.loc file to locate Central Inventory
解决方法(just for hpux)

login as root
$ mkdir -p /var/opt/oracle
$ vi oraInst.loc
####### begin ########
inventory_loc=/ora10g/oraInventory
inst_group=dba
####### end #######

上面的错误解决,opatch apply 第二个错误
OPatchSession cannot load inventory for the given Oracle Home /u01/app/grid/11.2.0. Possible causes are:
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory

原因:
/var/opt/oracle/oraInst.loc 中指定的inventory_loc目录不存在,重新生成inventory
解决方法 :
./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/ora10g/app/oracle/product/db10g” ORACLE_HOME_NAME=”OraDb10g_home1″

OPatch apply 成功后,检查组件状态
SQL> SELECT comp_name, status, substr(version,1,10) as version from dba_registry order
2 by modified;

COMP_NAME STATUS VERSION
—————————————- ———————- ——————–
Oracle Workspace Manager VALID 10.2.0.4.3
Oracle Database Packages and Types INVALID 10.2.0.4.0
Oracle Database Catalog Views VALID 10.2.0.4.0
JServer JAVA Virtual Machine VALID 10.2.0.4.0
Oracle XDK VALID 10.2.0.4.0
Oracle Data Mining VALID 10.2.0.4.0
Oracle Expression Filter VALID 10.2.0.4.0
Oracle Database Java Packages VALID 10.2.0.4.0
Oracle Text VALID 10.2.0.4.0
Oracle Rules Manager VALID 10.2.0.4.0
Oracle XML Database VALID 10.2.0.4.0
Oracle interMedia VALID 10.2.0.4.0
OLAP Analytic Workspace VALID 10.2.0.4.0
Oracle OLAP API VALID 10.2.0.4.0
Spatial VALID 10.2.0.4.0
OLAP Catalog VALID 10.2.0.4.0
Oracle Enterprise Manager VALID 10.2.0.4.0

原因:
是因为10.2.0.4中的catplan.sql 脚本创建的public synonym覆盖了原来的表PLAN_TABLE,MOS中有记录是bug 6893073

解决方法:
SQL>connect / as sysdba
SQL>drop table plan_table;
SQL>@?/rdbms/admin/utlxplan
SQL>@?/rdbms/admin/prvtspao.plb
SQL>@?/rdbms/admin/utlrp.sql

–enjoy–

打赏

对不起,这篇文章暂时关闭评论。