oracle 11g
单机升级
+PSU
目录
步骤
3
备份
ORACLE_HOME
和
oraInventory
.
3
步骤
4
上传并解压
oracle database 11.2.0.4
安装介质
…
3
步骤
5
进入安装目录执行
./runInstall
开始安装
…
3
步骤
6
修改
oracle
用户的环境变量和文件
/etc/oratab
.
4
步骤
14
删除原来的目录,需要
EM
的通过
EMCA
重建
EM
..
10
以下步骤为
11.2.0.4
打最新的
PSU
补丁
…
10
步骤
1
上传
PSU 11.2.0.4.6
补丁包并解压
…
10
步骤
4
进入
20299013
目录进行
PSU
升级,发现是
Opatch
版本不一致
…
11
步骤
7
使用新解压的
OPatch
安装
PSU
..
12
步骤
9
更新
dba_registry_history
视图最新
PSU
..
16
步骤
10
确认更新后的
dba_registry_history
视图
…
17
介质下载
以下介质的下载需要
oracle
的
MY ORACLE SUPPORT
账号并有下载权限:
Oracle 11.2.0.4 for linux x86_64
的
Patchset
下载地址
Patchset 13390677
PSU 11.2.0.4.6
补丁包下载参考
OracleRecommended Patches — Oracle Database [ID 756671.1]
如果
Opatch
版本不一致,需要更新
opatch
,
下
载
p6880880
,
实验环境
1.
操作系统
[root@dj11g ~]# uname -r
2.6.32-279.el6.x86_64
[root@dj11g ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release
6.3
(Santiago)
2.
数据库
SQL> select * from v$version;
BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
PL/SQL Release 11.2.0.3.0 – Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 – Production
NLSRTL Version 11.2.0.3.0 – Production
SQL> select name from v$database;
NAME
————-
ORCL
步骤
1
备份数据库
[oracle@dj11g backup]$ rman target /
RMAN>backup database plus archivelog delete input format \’/home/oracle/backup/full_%U.bak\’;
[oracle@dj11g backup]$ ll
total 29884
-rw-r—–. 1 oracle oinstall 30594560 Apr 20 13:55 full_01q4s1e0_1_1.bak
-rw-r—–. 1 oracle oinstall 3584 Apr 20 13:56 full_04q4s1gi_1_1.bak
步骤
2
停止数据库
1
、停止监听
[oracle@dj11g ~]$ lsnrctl stop
2
、停止数据库
SQL> shutdown immediate
3
、停止
EM
[oracle@dj11g ~]$ emctl stop dbconsole
4
、查看
oracle
进程,检查是否已经停止完毕
[oracle@dj11g ~]$ ps -ef |grep ora_
步骤
3
备份
ORACLE_HOME
和
oraInventory
[oracle@dj11g ~]$ tar -cvf dbhome.zip /u01/app
步骤
4
上传并解压
oracle database 11.2.0.4
安装介质
[root@dj11g opt]# unzip p13390677_112040_Linux-x86-64_1of7.zip
[root@dj11g opt]# unzip p13390677_112040_Linux-x86-64_2of7.zip
[root@dj11g opt]# chown -R oracle:oinstall database/
步骤
5
进入安装目录执行
./runInstall
开始安装
因为升级采用
out-of-place
的升级方式,所以安装前需要创建新的
ORACLE_HOME
目录:
[oracle@dj11g 11.2.0]$ mkdir /u01/app/oracle/product/11.2.0/db_2
安装时需要注意一下两步:
第三步选择最后一个选项
“Upgrade an existing database”
第六步选择新创建的
ORACLE_HOME
安装目录
执行完脚本之后继续运行,提示配置监听,选择
Cancel
,稍后复制,有报错可以忽略
步骤
6
修改
oracle
用户的环境变量和文件
/etc/oratab
至此
11.2.0.4
的软件就已经装完了,修改
Oracle
环境变量
[oracle@dj11g ~]$ vi .bash_profile
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
修改成
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_2
[root@dj11g opt]# vi /etc/oratab
orcl:/u01/app/oracle/product/11.2.0/db_1:N
修改成
orcl:/u01/app/oracle/product/11.2.0/db_2:N
步骤
7
复制相关文件
1.
复制
dbs
下面的文件
[oracle@dj11g dbs]$ cp /u01/app/oracle/product/11.2.0/db_1/dbs/* /u01/app/oracle/product/11.2.0/db_2/dbs/
2.
复制监听配置文件
[oracle@dj11g admin]$ cp /u01/app/oracle/product/11.2.0/db_1/network/admin/* /u01/app/oracle/product/11.2.0/db_2/network/admin/
cp: omitting directory `samples’
[oracle@dj11g admin]$
cp
-r
samples/ /u01/app/oracle/product/11.2.0/db_2/network/admin/
递归复制
步骤
8
执行升级前的脚本进行检查
SQL> startup upgrade;
SQL>
@?/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 04-20-2015 15:47:43
Script Version: 11.2.0.4.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
–> name: ORCL
–> version: 11.2.0.3.0
–> compatible: 11.2.0.0.0
–> blocksize: 8192
–> platform: Linux x86 64-bit
–> timezone file: V14
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
–> SYSTEM tablespace is adequate for the upgrade.
…. minimum required size: 924 MB
–> SYSAUX tablespace is adequate for the upgrade.
…. minimum required size: 623 MB
–> UNDOTBS1 tablespace is adequate for the upgrade.
…. minimum required size: 400 MB
–> TEMP tablespace is adequate for the upgrade.
…. minimum required size: 60 MB
–> EXAMPLE tablespace is adequate for the upgrade.
…. minimum required size: 310 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
–> If Target Oracle is 32-Bit, refer here for Update Parameters:
— No update parameter changes are required.
.
–> If Target Oracle is 64-Bit, refer here for Update Parameters:
— No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
— No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
— No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
–> Oracle Catalog Views [upgrade] VALID
–> Oracle Packages and Types [upgrade] VALID
–> JServer JAVA Virtual Machine [upgrade] VALID
–> Oracle XDK for Java [upgrade] VALID
–> Oracle Workspace Manager [upgrade] VALID
–> OLAP Analytic Workspace [upgrade] VALID
–> OLAP Catalog [upgrade] VALID
–> EM Repository [upgrade] VALID
–> Oracle Text [upgrade] VALID
–> Oracle XML Database [upgrade] VALID
–> Oracle Java Packages [upgrade] VALID
–> Oracle interMedia [upgrade] VALID
–> Spatial [upgrade] VALID
–> Expression Filter [upgrade] VALID
–> Rule Manager [upgrade] VALID
–> Oracle Application Express [upgrade] VALID
… APEX will only be upgraded if the version of APEX in
… the target Oracle home is higher than the current one.
–> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: –> Your recycle bin is turned on and currently contains no objects.
…. Because it is REQUIRED that the recycle bin be empty prior to upgrading
…. and your recycle bin is turned on, you may need to execute the command:
PURGE DBA_RECYCLEBIN
…. prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: –> Database contains schemas with objects dependent on DBMS_LDAP package.
…. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
…. USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
**********************************************************************
Oracle recommends removing all hidden parameters prior to upgrading.
To view existing hidden parameters execute the following command
while connected AS SYSDBA:
SELECT name,description from SYS.V$PARAMETER WHERE name
LIKE ‘\_%’ ESCAPE ‘\’
Changes will need to be made in the init.ora or spfile.
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),’ ‘)) FROM sys.v$parameter2
WHERE UPPER(name) =’EVENT’ AND isdefault=’FALSE’
Trace Events:
SELECT (translate(value,chr(13)||chr(10),’ ‘)) from sys.v$parameter2
WHERE UPPER(name) = ‘_TRACE_EVENTS’ AND isdefault=’FALSE’
Changes will need to be made in the init.ora or spfile.
**********************************************************************
有问题的需要解决,没问题的开始升级,我执行的没问题
步骤
9
创建回滚点
SQL>alter database flashback on;
SQL>create restore pointmaclean_rollback guarantee flashback database;
SQL>select* fromv$restore_point;
步骤
10
开始升级
SQL> set echo on
SQL> spool /home/oracle/upgrade.log
SQL> set time on;
16:04:38 SQL>
@?/rdbms/admin/catupgrd.sql
16:05:23 SQL> Rem
16:05:23 SQL> Rem $Header: rdbms/admin/catupgrd.sql /st_rdbms_11.2.0/3 2011/05/18 15:07:25 cmlim Exp $
16:05:23 SQL> Rem
16:05:23 SQL> Rem catupgrd.sql
16:05:23 SQL> Rem
16:05:23 SQL> Rem Copyright (c) 1999, 2011, Oracle and/or its affiliates.
16:05:23 SQL> Rem All rights reserved.
16:05:23 SQL> Rem
16:05:23 SQL> Rem NAME
16:05:23 SQL> Rem catupgrd.sql – CATalog UPGraDe to the new release
篇幅过长,省略。。。。。。
16:50:47 SQL>
16:50:47 SQL> REM END OF CATUPGRD.SQL
16:50:47 SQL>
16:50:47 SQL> REM bug 12337546 – Exit current sqlplus session at end of catupgrd.sql.
16:50:47 SQL> REM This forces user to start a new sqlplus session in order
16:50:47 SQL> REM to connect to the upgraded db.
16:50:47 SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
catupgrd.sql
脚本运行了
45
分钟,执行完之后会
shutdown immediate
数据库,这个时候我们将要重启数据库运行
utlrp.sql
脚本编译失效对象:
步骤
11
编译失效对象
SQL> startup
SQL>
@?/rdbms/admin/utlrp.sql
TIMESTAMP
——————————————————————————–
COMP_TIMESTAMP UTLRP_BGN 2015-04-20 16:56:24
DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC> objects in the database. Recompilation time is proportional to the
DOC> number of invalid objects in the database, so this command may take
DOC> a long time to execute on a database with a large number of invalid
DOC> objects.
篇幅过长,省略。。。。。。
ERRORS DURING RECOMPILATION
—————————
0
Function created.
PL/SQL procedure successfully completed.
Function dropped.
PL/SQL procedure successfully completed.
步骤
12
查看各组件版本号
SQL> select comp_name,status,version from dba_server_registry;
COMP_NAME STATUS VERSION
—————————— ———————-
OWB VALID 11.2.0.3.0
Oracle Application Express VALID 3.2.1.00.12
Oracle Enterprise Manager VALID 11.2.0.4.0
OLAP Catalog VALID 11.2.0.4.0
Spatial VALID 11.2.0.4.0
Oracle Multimedia VALID 11.2.0.4.0
Oracle XML Database VALID 11.2.0.4.0
Oracle Text VALID 11.2.0.4.0
Oracle Expression Filter VALID 11.2.0.4.0
Oracle Rules Manager VALID 11.2.0.4.0
Oracle Workspace Manager VALID 11.2.0.4.0
Oracle Database Catalog Views VALID 11.2.0.4.0
Oracle Database Packages and Types VALID 11.2.0.4.0
JServer JAVA Virtual Machine VALID 11.2.0.4.0
Oracle XDK VALID 11.2.0.4.0
Oracle Database Java Packages VALID 11.2.0.4.0
OLAP Analytic Workspace VALID 11.2.0.4.0
Oracle OLAP API VALID 11.2.0.4.0
18 rows selected.
步骤
13
检查无效对象
SQL> set linesize 500
SQL> col owner format a15
SQL> col object_name format a30
SQL> col object_id format 99999999
SQL> col object_type format a10
SQL>
SQL> SELECT OWNER,OBJECT_NAME, OBJECT_ID, OBJECT_TYPE,to_char(CREATED,’yyyy-mm-dd,hh24:mi:ss’) CREATED,
2 to_char(LAST_DDL_TIME,’yyyy-mm-dd,hh24:mi:ss’) LAST_DDL_TIME,STATUS
3 FROM dba_objects where status<>’VALID’ order by owner,object_name,OBJECT_TYPE;
no rows selected
步骤
14
删除原来的目录,需要
EM
的通过
EMCA
重建
EM
[root@dj11g opt]# rm -rf /u01/app/oracle/product/11.2.0/db_1/
至此,数据库已经从
11.2.0.3
升级
11.2.0.4
完成。
以下步骤为
11.2.0.4
打最新的
PSU
补丁
步骤
1
上传
PSU 11.2.0.4.6
补丁包并解压
[root@dj11g opt]# unzip p20299013_112040_Linux-x86-64.zip
[root@dj11g opt]# chown -R oracle:oinstall 20299013/
步骤
2
检查当前数据库
PSU
号
[oracle@dj11g OPatch]$ pwd
/u01/app/oracle/product/11.2.0/db_2/OPatch
[oracle@dj11g OPatch]$
./opatch version
OPatch Version:
11.2.0.3.4
OPatch succeeded.
[oracle@dj11g OPatch]$
./opatch
lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_2/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_10-53-20AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/lsinv/lsinventory2015-04-22_10-53-20AM.txt
——————————————————————————–
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
——————————————————————————–
OPatch succeeded.
步骤
3
关闭数据库
[oracle@dj11g opt]$ lsnrctl stop
SQL> shutdown immediate
步骤
4
进入
20299013
目录进行
PSU
升级,发现是
Opatch
版本不一致
[oracle@dj11g 20299013]$ /u01/app/oracle/product/11.2.0/db_2/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_2/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_11-24-26AM_1.log
Verifying environment and performing prerequisite checks…
Prerequisite check “CheckMinimumOPatchVersion” failed.
The details are:
The OPatch being used has version 11.2.0.3.4 while the following patch(es) require higher versions:
Patch 17478514 requires OPatch version 11.2.0.3.5.
Patch 18031668 requires OPatch version 11.2.0.3.5.
Patch 18522509 requires OPatch version 11.2.0.3.5.
Patch 19121551 requires OPatch version 11.2.0.3.5.
Patch 19769489 requires OPatch version 11.2.0.3.5.
Patch 20299013 requires OPatch version 11.2.0.3.5.
Please download latest OPatch from My Oracle Support.
UtilSession failed: Prerequisite check ”
CheckMinimumOPatchVersion
” failed.
Log file location: /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_11-24-26AM_1.log
OPatch failed with error code 73
步骤
5
上传下载的
OPatch
并解压
[root@dj11g opt]# unzip p6880880_112000_Linux-x86-64.zip
[root@dj11g opt]# chown -R oracle:oinstall OPatch/
步骤
6
执行安装前的检查
[oracle@dj11g opt]$ cd 20299013/
[oracle@dj11g 20299013]$
/opt/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_2/oraInst.loc
OPatch version : 11.2.0.3.10
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_11-46-24AM_1.log
Invoking prereq “checkconflictagainstohwithdetail”
Prereq “checkConflictAgainstOHWithDetail” passed.
OPatch succeeded.
步骤
7
使用新解压的
OPatch
安装
PSU
[oracle@dj11g 20299013]$
/opt/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_2/oraInst.loc
OPatch version : 11.2.0.3.10
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_11-47-28AM_1.log
Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 17478514 18031668 18522509 19121551 19769489 20299013
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:
y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = ‘/u01/app/oracle/product/11.2.0/db_2’)
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files…
Applying sub-patch ‘17478514’ to OH ‘/u01/app/oracle/product/11.2.0/db_2’
Patching component oracle.rdbms, 11.2.0.4.0…
篇幅过长,省略。。。。。。
Patching component oracle.rdbms.rman, 11.2.0.4.0…
Patching component oracle.rdbms.deconfig, 11.2.0.4.0…
Verifying the update…
Composite patch 20299013 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_11-47-28AM_1.log
OPatch succeeded.
步骤
8
安装后的检查
[oracle@dj11g 20299013]$
/opt/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.10
Copyright (c) 2015, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_2/oraInst.loc
OPatch version : 11.2.0.3.10
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/opatch2015-04-22_12-25-55PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_2/cfgtoollogs/opatch/lsinv/lsinventory2015-04-22_12-25-55PM.txt
——————————————————————————–
Local Machine Information::
Hostname: dj11g
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 20299013 : applied on Wed Apr 22 11:51:29 CST 2015
Unique Patch ID: 18573940
Patch description: “Database Patch Set Update : 11.2.0.4.6 (20299013)”
Created on 4 Mar 2015, 02:27:44 hrs PST8PDT
Sub-patch 19769489; “Database Patch Set Update : 11.2.0.4.5 (19769489)”
Sub-patch 19121551; “Database Patch Set Update : 11.2.0.4.4 (19121551)”
Sub-patch 18522509; “Database Patch Set Update : 11.2.0.4.3 (18522509)”
Sub-patch 18031668; “Database Patch Set Update : 11.2.0.4.2 (18031668)”
Sub-patch 17478514; “Database Patch Set Update : 11.2.0.4.1 (17478514)”
Bugs fixed:
17288409, 17798953, 18273830, 18607546, 17811429, 17205719, 20506699
17816865, 19972566, 17922254, 17754782, 16384983, 17726838, 13364795
16934803, 17311728, 17284817, 17441661, 17360606, 13645875, 18199537
16992075, 16542886, 17446237, 14015842, 17889549, 14565184, 19972569
17071721, 20299015, 17610798, 17375354, 17449815, 17397545, 19463897
18230522, 13866822, 17235750, 17982555, 16360112, 18317531, 17478514
19769489, 12905058, 14338435, 18235390, 13944971, 18641451, 20142975
17811789, 16929165, 18704244, 12747740, 18430495, 20506706, 17546973
14054676, 17088068, 17346091, 18264060, 17016369, 17042658, 17343514
14602788, 19972568, 19680952, 18471685, 19788842, 18508861, 14657740
17332800, 19211724, 13837378, 13951456, 16315398, 17186905, 18744139
19972564, 16850630, 18315328, 17437634, 19049453, 18673304, 17883081
19006849, 19915271, 19013183, 18641419, 17296856, 18674024, 18262334
17006183, 18277454, 16833527, 17232014, 16855292, 10136473, 17762296
14692762, 17705023, 18051556, 17865671, 17852463, 18554871, 17853498
19121551, 18334586, 19854503, 17551709, 19309466, 17588480, 19827973
17344412, 17842825, 18828868, 18681862, 18554763, 17390160, 18456514
16306373, 17025461, 13955826, 18139690, 11883252, 13609098, 17501491
17239687, 17752121, 17299889, 17602269, 19197175, 17889583, 18316692
17313525, 18673325, 12611721, 19544839, 18293054, 17242746, 18964939
17600719, 18191164, 19393542, 17571306, 18482502, 19466309, 17951233
17649265, 18094246, 19615136, 17040527, 17011832, 17165204, 18098207
16785708, 16870214, 17465741, 16180763, 17174582, 17477958, 12982566
16777840, 18522509, 20631274, 16091637, 17323222, 19463893, 16595641
16875449, 12816846, 16524926, 17237521, 18228645, 18282562, 17596908
19358317, 17811438, 17811447, 17945983, 18762750, 17156148, 18031668
16912439, 17184721, 16494615, 18061914, 17282229, 17545847, 18331850
18202441, 17082359, 18723434, 19554106, 17614134, 13558557, 17341326
14034426, 17891946, 18339044, 17716305, 19458377, 17752995, 16392068
19271443, 17891943, 18092127, 17258090, 17767676, 16668584, 18384391
17614227, 17040764, 16903536, 17381384, 14106803, 15913355, 18973907
18356166, 18673342, 17389192, 14084247, 16194160, 17612828, 17006570
20506715, 17721717, 13853126, 17390431, 18203837, 17570240, 14245531
16043574, 16863422, 17848897, 17877323, 18325460, 19727057, 17468141
17786518, 17912217, 16422541, 19972570, 17267114, 17037130, 18244962
18765602, 18203838, 18155762, 16956380, 16198143, 17246576, 17478145
17394950, 14829250, 18189036, 18641461, 18619917, 17835627, 17027426
16268425, 18247991, 19584068, 14458214, 18436307, 17265217, 17634921
13498382, 16692232, 17786278, 17227277, 16042673, 16314254, 17443671
18000422, 16228604, 16837842, 17571039, 17393683, 16344544, 17787259
18009564, 20074391, 14354737, 15861775, 18135678, 18614015, 16399083
18362222, 18018515, 16472716, 17835048, 17050888, 17936109, 14010183
17325413, 18747196, 17080436, 16613964, 17036973, 17761775, 16579084
16721594, 17082983, 18384537, 18280813, 20296213, 17302277, 16901385
18084625, 15979965, 15990359, 18203835, 17297939, 17811456, 16731148
13829543, 14133975, 17215560, 17694209, 18091059, 17385178, 8322815
17586955, 18441944, 17201159, 16450169, 9756271, 17655634, 19730508
17892268, 18868646, 17648596, 16220077, 16069901, 11733603, 16285691
17587063, 18180390, 16538760, 18193833, 17348614, 17393915, 17957017
17274537, 18096714, 17308789, 17238511, 18436647, 17824637, 14285317
19289642, 14764829, 17622427, 18328509, 16571443, 16943711, 14368995
18306996, 17346671, 14852021, 18996843, 17783588, 16618694, 17853456
18674047, 17672719, 18856999, 12364061, 18783224, 17851160, 17546761
——————————————————————————–
OPatch succeeded.
[oracle@dj11g 20299013]$
/opt/OPatch/opatch lspatches
20299013;Database Patch Set Update : 11.2.0.4.6 (20299013)
OPatch succeeded.
步骤
9
更新
dba_registry_history
视图最新
PSU
SQL> startup
[oracle@dj11g 20299013]$ lsnrctl start
SQL> alter system register;
SQL> @?/rdbms/admin/catbundle.sql psu apply
PL/SQL procedure successfully completed.
Function created.
Function created.
篇幅过长,省略。。。。。。
SQL> PROMPT Updating registry…
Updating registry…
SQL> INSERT INTO registry$history
2 (action_time, action,
3 namespace, version, id,
4 bundle_series, comments)
5 VALUES
6 (SYSTIMESTAMP, ‘APPLY’,
7 SYS_CONTEXT(‘REGISTRY$CTX’,’NAMESPACE’),
8 ‘11.2.0.4’,
9 6,
10 ‘PSU’,
11 ‘PSU 11.2.0.4.6’);
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_ORCL_APPLY_2015Apr22_12_33_43.log
步骤
10
确认更新后的
dba_registry_history
视图
SQL> col action_time format a35
SQL> col action format a15
SQL> col namespace format a10
SQL> col version format a10
SQL>
select action_time,action,namespace,version,id from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID
———————————– ————— ———- ———-
17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0
20-APR-15 01.45.14.243724 PM APPLY SERVER 11.2.0.3 0
20-APR-15 04.50.28.562925 PM VIEW INVALIDATE 8289601
20-APR-15 04.50.28.900803 PM UPGRADE SERVER 11.2.0.4.0
22-APR-15 12.34.40.570032 PM APPLY SERVER 11.2.0.4 6
5 rows selected.
SQL>
select action,comments from registry$history;
ACTION COMMENTS
—————
APPLY Patchset 11.2.0.2.0
APPLY Patchset 11.2.0.2.0
VIEW INVALIDATE view invalidation
UPGRADE Upgraded from 11.2.0.3.0
APPLY PSU 11.2.0.4.6
5 rows selected.
SQL>
SELECT* FROM PRODUCT_COMPONENT_VERSION;
PRODUCT VERSION STATUS
——————————————————————————–
NLSRTL 11.2.0.4.0 Production
Oracle Database 11g Enterprise Edition 11.2.0.4.0 64bit Production
PL/SQL 11.2.0.4.0 Production
TNS for Linux:11.2.0.4.0 Production
4 rows selected.
至此从
11.2.0.3
升级到
11.2.0.4
并打上
11.2.0.4.6
的补丁全部结束。