日期:2014-05-17  浏览次数:20877 次

Oracle 10gr1升级,你能否保证顺利完成?

  上周末,对一家公司的数据库进行健康性检查与优化操作,顺便进行了软件升级,将Oracle 10gr1 x32升级到Oracle10gr2 10.2.0.4 x64,升级工作很顺利的完成,可在最后配置EM管理界面时出了一些问题

  

  早就知道Oracle10g Enterprise Manager是一个很脆弱的东西,改一下IP,监听、主机名……的EM就启动不起来,需要重配,按照以往的思路,要对其狠一些,将EM彻底删除并重装,百分百会成功,可就这种想法害了我,折腾了三个小时

  1、 重装步骤:

  A、以SYS管理员身份首先进行如下操作

  
view plaincopy to clipboardprint?
01.drop user sysman cascade;  
02.  
03.  drop user dbsnmp cascade;  
04.  
05.  drop role MGMT_USER;  
06.  
07.  drop user MGMT_VIEW cascade;  
08.  
09.  drop public synonym MGMT_TARGET_BLACKOUTS;  
10.  
11.  drop public synonym SETEMVIEWUSERCONTEXT;  
drop user sysman cascade;

  drop user dbsnmp cascade;

  drop role MGMT_USER;

  drop user MGMT_VIEW cascade;

  drop public synonym MGMT_TARGET_BLACKOUTS;

  drop public synonym SETEMVIEWUSERCONTEXT;

  B、使用EMCA重新配置dbcosole  

  
view plaincopy to clipboardprint?
01.emca -repos drop  
02.  
03.  emca -repos create  
04.  
05.  emca -config dbcontrol db  
06.  
07.  emctl start dbconsole  
emca -repos drop

  emca -repos create

  emca -config dbcontrol db

  emctl start dbconsole

  2、 重装结果:   

  达不到预期的欢迎界面跳出,一直是上面的错误,搞的我的脸都变阴了

  3、查看出错日志信息  

  
view plaincopy to clipboardprint?
01.oracle.sysman.emcp.exception.EMConfigException: 启动 Database Control 时出错  
02.  
03.  at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)  
04.  
05.  at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)  
06.  
07.  at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)  
08.  
09.  at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)  
10.  
11.  at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:436)  
12.  
13.  at java.lang.Thread.run(Thread.java:595)  
oracle.sysman.emcp.exception.EMConfigException: 启动 Database Control 时出错

  at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)

  at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)

  at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)

  at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)

  at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:436)

  at java.lang.Thread.run(Thread.java:595)   

  trace文件%ORACLE_HOME%\<HOSTNAME>_<SID>\sysman\log\emagent.trc输出:   

  2012-02-22 10:29:51 Thread-3068 ERROR util.files: ERROR: nmeufis_new: failed in lfiopn on file: E:\oracle\product\10.2.0\db_1\dbserver1_orcl\sysman\emd\agntstmp.txt. error = 0 (No error)   

  2012-02-22 10:29:51 Thread-3068 ERROR ssl: Open wallet failed, ret = 28750   

  2012-02-22 10:29:51 Thread-3068 ERROR ssl: nmehlenv_openWallet failed   

  2012-02-22 10:29:51 Thread-3068 ERROR http: 660: Unable to initialize ssl connection with server, aborting connection attempt  

   2012-02-22 10:29:51 Thread-3068 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://dbserver1:1158/em/upload/: retStatus=-1

 

  4、官方咨询与搜过得知:   

  此问题是由于enterprise manager database control组件的跟CA证书授权过期造成的,其证书到期日为2010年12月31日,2012年安装此版本数据库都会出现这个问题,官方的解决方案是打Patch 8350262

 

  5、单实例数据库应用此patch的方法如下:  

   A. 安装或者升级数据库到10.2.