ORACLE12.2 升級之路 之 02(10.2.0.1本機升級10.2.0.5)

# 10.2.0.1 升級 到 10.2.0.5

环境介绍:

当前Oracle版本:10.2.0.1+数据库

升级Oracle版本:10.2.0.5+数据库

#关闭实例,监听 和 OEM

[oracle@XAG105 zhs]$ emctl stop dbconsole

TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 

Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

http://XAG105:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 10g Database Control ...

...  Stopped.

[oracle@XAG105 zhs]$ dbca

[oracle@XAG105 zhs]$

[oracle@XAG105 zhs]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-AUG-2018 18:49:01

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XAG105)(PORT=1521)))

The command completed successfully

[oracle@XAG105 zhs]$

[oracle@XAG105 zhs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Aug 17 18:49:17 2018

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

修改版本标识,以安装相对rhel6而言较老的oracle

可以先保存一份:

cp /etc/redhat-release /etc/redhat-release.bak

vi /etc/redhat-release

原:CentOS Linux release 7.3.1611 (Core)

修改为: redhat-4

[oracle@XAG105 setup]$ unzip p8202632_10205_Linux-x86-64.zip

[oracle@XAG105 setup]$ cd Disk1/

[oracle@XAG105 Disk1]$ env | grep ORA

ORACLE_SID=MPACC

ORACLE_BASE=/u01/app/oracle

ORACLE_TERM=xterm

ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

[oracle@XAG105 Disk1]$ ./runInstaller

这里继续点击“continue”即可,待Oracle完成安装后,再手工执行相应脚本完成链接即可。

当oracle完成安装后,如下操作

[oracle@hyl bin]$ /u01/app/oracle/product/10.2.0/db_1/bin/relink all

--执行脚本后,会自动完成重链接操作

cp /etc/redhat-release.bak /etc/redhat-release

#手工升级库

sqlplus / as sysdba

#升级模式启动DB

SQL> startup upgrade

SQL> SPOOL /home/oracle/update.log

#重建数据字典

SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catupgrd.sql

SQL> SPOOL OFF

#重建数据字典完成后,重启数据库

SQL> shutdown immediate;

SQL> startup

#编译无效对象

SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/utlrp.sql

#检查升级后状态

#查看版本

SQL>select * from v$version;

SQL> col comp_name format a40

SQL> col version for a20

SQL> SELECT COMP_NAME, VERSION, STATUS MODIFID FROM SYS.DBA_REGISTRY;

[oracle@XAG105 setup]$ unzip p8350262_10205_Generic.zip

[oracle@XAG105 setup]$ cd 8350262/

[oracle@XAG105 8350262]$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply

Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9

Copyright (c) 2009, Oracle Corporation.  All rights reserved.

Oracle Home      : /u01/app/oracle/product/10.2.0/db_1

Central Inventory : /u01/app/oracle/oraInventory

  from          : /etc/oraInst.loc

OPatch version    : 10.2.0.4.9

OUI version      : 10.2.0.5.0

OUI location      : /u01/app/oracle/product/10.2.0/db_1/oui

Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2018-08-20_22-45-56PM.log

Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '8350262' to OH '/u01/app/oracle/product/10.2.0/db_1'

Running prerequisite checks...

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Backing up files and inventory (not for auto-rollback) for the Oracle Home

Backing up files affected by the patch '8350262' for restore. This might take a while...

Backing up files affected by the patch '8350262' for rollback. This might take a while...

Patching component oracle.sysman.agent.core, 10.2.0.5.0a...

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/RootCert.class"

Updating jar file "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class"

ApplySession adding interim patch '8350262' to inventory

Verifying the update...

Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.

Files check OK: Files from Patch ID 8350262 are present in Oracle Home.

OPatch succeeded.

[oracle@XAG105 8350262]$

#重新配置EM

#检查/etc/hosts 文件

[oracle@XAG105 admin]$ cat /etc/hosts

127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4

::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.40.105 XAG105 XAG105.COM

[oracle@XAG105 admin]$

#启动监听:

[oracle@XAG105 admin]$  lsnrctl start

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 17-AUG-2018 19:36:51

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.5.0 - Production

System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XAG105)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XAG105)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                    LISTENER

Version                  TNSLSNR for Linux: Version 10.2.0.5.0 - Production

Start Date                17-AUG-2018 19:36:51

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level              off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XAG105)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[oracle@XAG105 admin]$

[oracle@XAG105 admin]$

#删除OEM的 dbconsole 和repository

[oracle@XAG105 admin]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Aug 17, 2018 7:38:26 PM

EM Configuration Assistant, Version 10.2.0.5.0 Production

Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:

Database SID: MPACC

Listener port number: 1521

Password for SYS user: 

Password for SYSMAN user: 

----------------------------------------------------------------------

WARNING : While repository is dropped the database will be put in quiesce mode.

----------------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: yes

Aug 17, 2018 7:38:53 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MPACC/emca_2018-08-17_07-38-26-PM.log.

Aug 17, 2018 7:38:53 PM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Aug 17, 2018 7:38:56 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Aug 17, 2018 7:38:56 PM oracle.sysman.emcp.EMReposConfig dropRepository

INFO: Dropping the EM repository (this may take a while) ...

Aug 17, 2018 7:39:15 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Enterprise Manager configuration completed successfully

FINISHED EMCA at Aug 17, 2018 7:39:15 PM

[oracle@XAG105 admin]$

#重建EM的dbcontrol 和 repository

[oracle@XAG105 admin]$ emca -config dbcontrol db -repos create

STARTED EMCA at Aug 17, 2018 7:39:31 PM

EM Configuration Assistant, Version 10.2.0.5.0 Production

Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:

Database SID: MPACC

Listener port number: 1521

Password for SYS user: 

Password for DBSNMP user: 

Password for SYSMAN user: 

Email address for notifications (optional):

Outgoing Mail (SMTP) server for notifications (optional):

-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1

Local hostname ................ XAG105

Listener port number ................ 1521

Database SID ................ MPACC

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: yes

Aug 17, 2018 7:40:05 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MPACC/emca_2018-08-17_07-39-31-PM.log.

Aug 17, 2018 7:40:05 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Aug 17, 2018 7:40:56 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Aug 17, 2018 7:40:59 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Aug 17, 2018 7:43:35 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Database Control secured successfully.

Aug 17, 2018 7:43:35 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 162,825评论 4 377
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 68,887评论 2 308
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 112,425评论 0 255
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,801评论 0 224
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 53,252评论 3 299
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 41,089评论 1 226
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 32,216评论 2 322
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 31,005评论 0 215
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,747评论 1 250
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,883评论 2 255
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,354评论 1 265
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,694评论 3 265
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,406评论 3 246
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,222评论 0 9
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,996评论 0 201
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 36,242评论 2 287
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 36,017评论 2 281

推荐阅读更多精彩内容