溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle 12.1.0.1 GI+DATABASE打PSU

發布時間:2020-07-10 08:52:42 來源:網絡 閱讀:748 作者:bin321 欄目:關系型數據庫

12.1.0.1 打Patch Set Update 12.1.0.1.9 (Oct2015)


機器:兩臺OLE6.5的,并且安裝好12.1.0.1的RAC



前期準備:下載好p6880880_121010_Linux-x86-64(OPATCH工具包),p21551666_121010_Linux-x86-64(GI和DATABASE的PSU)



實施過程:


首先升級GI軟件的OPATCH工具
su - grid

--我的p6880880_121010_Linux-x86-64放在/u01/app/opatch/目錄下
cd /u01/app/opatch/

unzip p6880880_121010_Linux-x86-64

[grid@rac1 opatch]$ which crs_stat
/u01/app/grid/12.1.0.1/bin/crs_stat


--將原先的OPatch 工具進行備份
su -

cd /u01/app/grid/12.1.0.1/

mv OPatch/ OPatch_bak



---將解壓好的OPatch復制到/u01/app/grid/12.1.0.1/ 進行opatch升級
mv /u01/app/opatch/OPatch/   /u01/app/grid/12.1.0.1




su - grid
[grid@rac1 OPatch]$ ./opatch version
OPatch Version: 12.1.0.1.9

OPatch succeeded.




--database軟件的opatch升級
su - oracle

cd /u01/app/opatch/

--同樣的以ORACLE用戶來解壓OPatch工具
unzip p6880880_121010_Linux-x86-64


[oracle@rac1 opatch]$ which sqlplus
/u01/app/oracle/12.1.0/db_1/bin/sqlplus




mv /u01/app/oracle/12.1.0/db_1/OPatch /u01/app/oracle/12.1.0/db_1/OPatch_bak

mv /u01/app/opatch/OPatch/ /u01/app/oracle/12.1.0/db_1


cd /u01/app/oracle/12.1.0/db_1/OPatch

[oracle@rac1 OPatch]$ ./opatch version
OPatch Version: 12.1.0.1.9

OPatch succeeded.



以上升級OPatch工具均要在兩個節點上進行





 
接下來升級GI


升級前可以先對GI軟件進行備份



su -
crsctl stop crs
然后把GI軟件tar

其實就算補丁打失敗了也可以rollback




cd /u01/app/grid/12.1.0.1/OPatch/ocm/bin/

[grid@rac1 bin]$ chmod u+x emocmrsp

[grid@rac1 bin]$ ./emocmrsp
OCM Installation Response Generator 10.3.7.0.0 - Production
Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.

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
The OCM configuration response file (ocm.rsp) was successfully created.
[grid@rac1 bin]$
[grid@rac1 bin]$
[grid@rac1 bin]$ ls -l
total 16
-rwxr-x--- 1 grid oinstall 9063 Nov 27  2009 emocmrsp
-rw-r--r-- 1 grid oinstall  621 Oct 28 11:26 ocm.rsp








[oracle@rac1 OPatch]$ cd /u01/app/oracle/12.1.0/db_1/OPatch
[oracle@rac1 bin]$ ls -l
total 12
-rwxr-x--- 1 oracle oinstall 9063 Nov 27  2009 emocmrsp
[oracle@rac1 bin]$ chmod u+x emocmrsp
[oracle@rac1 bin]$ ls -l
total 12
-rwxr-x--- 1 oracle oinstall 9063 Nov 27  2009 emocmrsp
[oracle@rac1 bin]$ ./emocmrsp
OCM Installation Response Generator 10.3.7.0.0 - Production
Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.

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
The OCM configuration response file (ocm.rsp) was successfully created.




----檢查每個數據庫的庫存信息的一致性。
/u01/app/grid/12.1.0.1/OPatch/opatch lsinventory -detail -oh /u01/app/grid/12.1.0.1

/u01/app/oracle/12.1.0/db_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/12.1.0/db_1



/u01/app/grid/12.1.0.1/OPatch/opatchauto apply /u01/app/patch/21551666 -ocmrf /u01/app/grid/12.1.0.1/OPatch/ocm/bin/ocm.rsp







--開始升級GI和database(我是GI+DATABASE一起打psu的,也可以分開打)
[root@rac1 ~]# /u01/app/grid/12.1.0.2/OPatch/opatchauto apply /u01/app/patch/21551666 -ocmrf /u01/app/grid/12.1.0.2/OPatch/ocm/bin/ocm.rsp   
OPatch Automation Tool
Copyright (c)2014, Oracle Corporation. All rights reserved.

OPatchauto Version : 12.1.0.1.9
OUI Version        : 12.1.0.1.0
Running from       : /u01/app/grid/12.1.0.2

opatchauto log file: /u01/app/grid/12.1.0.2/cfgtoollogs/opatchauto/21551666/opatch_gi_2015-10-28_15-21-23_deploy.log

Parameter Validation: Successful

Configuration Validation: Successful

Patch Location: /u01/app/patch/21551666
Grid Infrastructure Patch(es): 17077442 17303297 21352619
DB Patch(es): 17077442 21352619

Patch Validation: Successful
Grid Infrastructure home:
/u01/app/grid/12.1.0.2
DB home(s):
/u01/app/oracle/12.1.0/db_1


Performing prepatch operations on CRS Home... Successful

Applying patch(es) to "/u01/app/oracle/12.1.0/db_1" ...
Patch "/u01/app/patch/21551666/17077442" successfully applied to "/u01/app/oracle/12.1.0/db_1".
Patch "/u01/app/patch/21551666/21352619" successfully applied to "/u01/app/oracle/12.1.0/db_1".

Applying patch(es) to "/u01/app/grid/12.1.0.2" ...
Patch "/u01/app/patch/21551666/17077442" successfully applied to "/u01/app/grid/12.1.0.2".
Patch "/u01/app/patch/21551666/17303297" successfully applied to "/u01/app/grid/12.1.0.2".
Patch "/u01/app/patch/21551666/21352619" successfully applied to "/u01/app/grid/12.1.0.2".

Performing postpatch operations on CRS Home... Successful

SQL changes, if any, are applied successfully on the following database(s): rac

Apply Summary:
Following patch(es) are successfully installed:
GI Home: /u01/app/grid/12.1.0.2: 17077442,17303297,21352619
DB Home: /u01/app/oracle/12.1.0/db_1: 17077442,21352619

opatchauto succeeded.


---以上步驟分別在兩臺機器上都要操作。


--升級完后要對數據庫進行應用,RAC只要在其中一個實例上運行就可以了
su - oracle

cd $ORACLE_HOME/OPatch

./datapatch -verbose

cd $ORACLE_HOME/rdbms/admin

sqlplus / as sysdba

SQL> @utlrp.sql

set line 200
col COMMENTS for a20
col ACTION_TIME for a30

SELECT * FROM dba_registry_history;

ACTION_TIME                    ACTION                         NAMESPACE                      VERSION                                ID BUNDLE_SERIES                  COMMENTS
------------------------------ ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ --------------------
16-SEP-15 11.26.40.379388 AM   APPLY                          SERVER                         12.1.0.1                                0 PSU                            Patchset 12.1.0.0.0
28-OCT-15 04.55.43.831149 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
28-OCT-15 04.55.47.057407 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
28-OCT-15 04.55.49.236190 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
28-OCT-15 04.55.50.409272 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9


--查詢結果是數據庫已經應用了補丁了。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女