Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399766
  • 博文数量: 58
  • 博客积分: 2096
  • 博客等级: 大尉
  • 技术积分: 608
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-29 16:09
个人简介

专注于数据库技术研究和实践,目前就职于互联网金融企业,提供Oracle数据库技术支持和维护。 联系电话:18616803656

文章分类

全部博文(58)

文章存档

2020年(1)

2019年(4)

2018年(1)

2017年(3)

2015年(4)

2014年(7)

2012年(1)

2011年(27)

2010年(8)

2009年(2)

我的朋友

分类: Oracle

2011-06-05 13:53:31

1.关闭数据库
2.备份数据库软件
3.patch
查看当前patch状态
$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.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/opatch-2011_Jun_05_13-38-00-CST_Sun.log

Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Jun_05_13-38-00-CST_Sun.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 10g 10.2.0.1.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.

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

OPatch succeeded.

应用patch
$ unzip p4518443_10201_LINUX.zip
Archive: p4518443_10201_LINUX.zip
creating: 4518443/
creating: 4518443/files/
creating: 4518443/files/opmn/
creating: 4518443/files/opmn/lib/
inflating: 4518443/files/opmn/lib/libons.so
creating: 4518443/files/lib/
inflating: 4518443/files/lib/libons.so
creating: 4518443/etc/
creating: 4518443/etc/config/
inflating: 4518443/etc/config/inventory
inflating: 4518443/etc/config/actions
creating: 4518443/etc/xml/
inflating: 4518443/etc/xml/GenericActions.xml
inflating: 4518443/etc/xml/ShiphomeDirectoryStructure.xml
inflating: 4518443/README.txt
$ cd 4518443/
$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.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/opatch-2011_Jun_05_13-39-27-CST_Sun.log

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

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 '4518443' for restore. This might take a while...
Backing up files affected by the patch '4518443' for rollback. This might take a while...

Patching component oracle.rdbms, 10.2.0.1.0...
Copying file to "/u01/app/oracle/product/10.2.0/db_1/opmn/lib/libons.so"
Copying file to "/u01/app/oracle/product/10.2.0/db_1/lib/libons.so"
ApplySession adding interim patch '4518443' to inventory

OPatch succeeded.
查看patch状态
$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.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/opatch-2011_Jun_05_13-39-49-CST_Sun.log

Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Jun_05_13-39-49-CST_Sun.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 10g 10.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch 4518443 : applied on Sun Jun 05 13:39:32 CST 2011
Created on 7 Dec 2005, 09:44:27 hrs US/Eastern
Bugs fixed:
4518443


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

OPatch succeeded.
查看patch详细信息
$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory -detail
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.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/opatch-2011_Jun_05_13-40-44-CST_Sun.log

Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Jun_05_13-40-44-CST_Sun.txt

...

Interim patches (1) :

Patch 4518443 : applied on Sun Jun 05 13:39:32 CST 2011
Created on 7 Dec 2005, 09:44:27 hrs US/Eastern
Bugs fixed:
4518443
Files Touched:
libons.so --> ORACLE_HOME/opmn/lib/libons.so
libons.so --> ORACLE_HOME/lib/libons.so
Patch Location in Inventory:
/u01/app/oracle/product/10.2.0/db_1/inventory/oneoffs/4518443
Patch Location in Storage area:
/u01/app/oracle/product/10.2.0/db_1/.patch_storage/4518443_Dec_7_2005_09_44_27

--------------------------------------------------------------------------------
OPatch succeeded.
移除patch
$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch rollback -id 4518443 -ph /home/oracle/4518443/
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.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/opatch-2011_Jun_05_13-44-43-CST_Sun.log

RollbackSession rolling back interim patch '4518443' from OH '/u01/app/oracle/product/10.2.0/db_1'

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

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

Patching component oracle.rdbms, 10.2.0.1.0...
Deleting file "/u01/app/oracle/product/10.2.0/db_1/opmn/lib/libons.so"
Copying file to "/u01/app/oracle/product/10.2.0/db_1/lib/libons.so"
RollbackSession removing interim patch '4518443' from inventory

OPatch succeeded.
查看patch状态
$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.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/opatch-2011_Jun_05_13-45-04-CST_Sun.log

Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Jun_05_13-45-04-CST_Sun.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 10g 10.2.0.1.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.

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

OPatch succeeded.

$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply

4.启动数据库
SQL> startup
ORACLE instance started.

Total System Global Area 419430400 bytes
Fixed Size 1219736 bytes
Variable Size 142607208 bytes
Database Buffers 268435456 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> select status from v$instance;

STATUS
------------
OPEN

成功!
阅读(982) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~