VMware 下的linux,使用dbca创建数据库时出现关于jvm的问题
2014-06-06 16:56
465 查看
参考大神文档地址:
http://www.linuxidc.com/Linux/2012-08/69190.htm
http://www.233.com/oracle/zonghe/20100926/10494228.html
文章1:
环境:
OS:Red Hat Linux As 5
DB:11.2.0.1
今天在安装好11gR2软件后准备通过dbca创建数据库,执行dbca的时候包如下错误:
[Oracle@primary ~]$dbca
Oracle Net Services Configuration:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xa44b13a8, pid=2973, tid=3086891216
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_17-b02 mixed mode)
# Problematic frame:
# C [libnnz11.so+0x3c3a8]
#
# An error report file with more information is saved as hs_err_pid2973.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
网上搜索了很多相关的帖子,基本上说的是64位的机器安装了32位的数据导致的,但我的机器是32位的,下载的oracle版本也是32位的,但也报这个错误.先不管了,按照网上说的需要打补丁p8670579_112010_LINUX.zip.
下载该补丁后,按照README.txt步骤将该补丁打上后执行dbca,呵呵,创建db的图形出来了,问题解决.
p8670579_112010_LINUX.zip下载:
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是www.linuxidc.com
具体下载目录在 /2012年资料/8月/28日/Oracle 11gR2执行DBCA报错误
步骤如下:
1.下载p8670579_112010_LINUX.zip,并上传到服务器上的目录/ftp
2.确认是否配置了ORACLE_HOME
[oracle@primary]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
3.检查perl的版本,需要5.00503以上的版本
[oracle@primary 8670579]$ perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
4.Verify the OUI Inventory.
$opatch lsinventory
5.解压缩补丁包
$unzip p8670579_112010_LINUX.zip
6.确保数据库已经停止
$cd /ftp/8670579
$opatch apply
README.txt里的说明如下:
[oracle@primary 8670579]$ more README.txt
=========================================================================
Interim Patch for Base Bug: 8670579
=========================================================================
Date: 25th February 2010
-------------------------------------------------------------------------
Platform Patch for : Linux x86
Product Patched : NETWORK
Product Version # : 11.2.0.1
RAC Rolling Installable : YES
Online Installable : NO
Bugs Fixed by this patch:
-------------------------
8670579 - DBBETA :NETCA/DBCA FAILED WITH HOTSPOT VIRTUAL MACHINE
Patch Preinstall Steps
----------------------
1. For non-recommended patches, you must have the exact symptoms
described in the service request (SR).
2. Confirm the version of Perl installed and configured for the ORACLE_HOME.
Oracle requires that all customers have at least Perl 5.00503 installed
and configured for patching activities inside the ORACLE_HOME. Follow
these steps to check the Perl version for the ORACLE_HOME being patched:
- source the ORACLE_HOME environment
- execute "perl -v"
- verify that the returned version of Perl is 5.00503 or higher
If the Perl configured for the ORACLE_HOME is not at 5.00503 or
higher, follow the directions in this metalink note to update to
a more recent version:
https://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_id=189489.1
3. Verify the OUI Inventory.
OPatch needs access to a valid OUI inventory to apply patches.
Validate the OUI inventory with the following command:
% opatch lsinventory
If the command errors out, contact Oracle Support and work to validate
and verify the inventory setup before proceeding.
4. Review and download the latest version of OPatch.
Oracle recommends that all customers be on the latest version of OPatch.
Please review the following metalink note and follow the instructions
to update to the latest version if needed:
https://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_id=224346.1
5. Confirm executables appear in your system PATH.
The patching process will use the unzip and the opatch executables. After
sourcing the ORACLE_HOME environment, confirm both of these exist before
continuing:
- "which opatch"
- "which unzip"
If either of these executables do not show in the PATH, correct the problem
before proceeding.
6. Create a location for storing the unzipped patch. This location
will be referred to later in the document as <PATCH_TOP>.
7. Unzip the patch zip file into the <PATCH_TOP>.
unzip -d <PATCH_TOP> <ZIP_FILE>
8. Shut down services running from the ORACLE_HOME.
Before applying this patch, do a clean shut down of all services
running from the ORACLE_HOME.
(a) In a non-RAC environment:
Shut down all services that are running from this ORACLE_HOME.
Confirm the return status from each shutdown command to verify
the shutdown is successful and there are no errors.
(b) In a RAC environment:
For each node in the RAC system, shut down the services for
the specific machine that are running from the ORACLE_HOME.
OPatch will be used on each node in the RAC system one at
a time. If this patch is not rolling RAC installable treat
it as a non-RAC environment and shut down all services.
As an example, in the case of a two node RAC system:
1. Stop instances running on node 1.
2. Run 'opatch apply <PATCH_TOP>/8670579' on node 1.
3. When the apply finishes, opatch asks for confirmation
before going on to apply the patch to node 2.
4. Start instances on node 1.
5. Stop instances running on node 2.
6. Ask opatch to continue to applying the patch to node 2.
7. Start instances on node 2.
9. Apply pre-requisite updates.
Patch Installation Steps:
-------------------------
1. Set your current directory to the directory where the patch is located.
% cd <PATCH_TOP>/8670579
2. Apply the patch.
Use the following command to apply the patch to the ORACLE_HOME:
% opatch apply
When OPatch starts, it will validate the patch and make sure there
are no conflicts with the software already installed in the ORACLE_HOME.
OPatch categorizes two types of conflicts:
(a) Conflicts with a patch already applied to the ORACLE_HOME
In this case, please stop the patch installation and contact
Oracle Support Services.
(b) Conflicts with subset patch already applied to the ORACLE_HOME
In this case, please continue the install, as the new patch
contains all the fixes from the existing patch in the ORACLE_HOME.
The subset patch will automatically be rolled back prior to the
installation of the new patch.
Patch Post Install Instructions:
--------------------------------
Patch Deinstallation Instructions:
----------------------------------
1. Make sure to follow the same pre-install steps when deinstalling
a patch. This includes verifying the inventory and shutting down
any services running from the ORACLE_HOME / machine before rolling
the patch back.
2. Change to the directory where the patch was unzipped.
% cd <PATCH_TOP>/8670579
3. Run OPatch to deinstall the patch.
% opatch rollback -id 8670579
注意opatch命令是在$ORACLE_HOME/OPatch/目录下,环境变量PATH中没有包含该目录的话,直接敲入opatch命令是提示找不到改命令的,这时需要将该目录加入到PATH中
-------------------------------------
参考文章2:
从9.2版开始,Oracle公司设计实现了个别补丁安装管理工具opatch.opatch使用一
个称为inventory的系统数据结构(严格说是与oui共享inventory),集中管理所有已安装的个别补丁;个别
补丁的安装和卸载都使用opatch命令完成,冲突检测也由opatch在安装时自动完成;提供列表命令可以很方
便得到已安装个别补丁的信息。
10g(10.1和10.2)版本中,opatch作为一个标准工具,在软件安装时自动安装。(安装在
$ORACLE_HOME/OPatch下。)而对于9.2版,需要从metalink下载opatch.无论数据库是哪一个版本,系统中是
否已经安装opatch,在使用之前,应从metalink下载最新版本的opatch.很遗憾,由于系统实现的问题,10.2
使用的opatch与之前版本(10.1和9.2)使用的opatch不兼容,不能混用,这一点必须注意。
opatch是使用perl编写的脚本程序(其中也使用JAVA API)。编程使用的perl版本是5.6版,虽然在5.6
之前的版本中也可运行,但应尽可能安装5.6或以上的版本的perl.对于DBA来说一个好消息是,如果安装9.2
版软件时保留了HTTP服务器,则在$ORACLE_HOME/Apache下会自动安装perl.(10g会自动安装配置perl和opatch.)
opatch命令格式为:opatch < command > [< command_options >] [ -h[elp] ]
命令有:apply(安装个别补丁)、rollback(卸载个别补丁)、lsinventory(对inventory进行列表)
、query(显示某一个别补丁的详细信息)、version(显示opatch版本信息)。在opatch目录下,有用户使
用指南文件(Users_Guide.txt),其中有详细的命令格式和使用示例,读者可以参考。Opatch执行操作时,
除在屏幕输出结果外,还生成日志文件。日志文件的路径和文件名格式如下:
$ORACLE_HOME/.patch_storage/< patch_id >/< action >-< patch_id >_< mm-dd-yyyy_hh-mi-ss>.log
其中“patch_id”是Oracle技术支持部门为个别补丁分配的编号。
* 个别补丁安装实例
沿用安装PSR实例中的环境。在安装PSR10.1.0.5后,检索metalink,发现若干在其之上的个别补丁。选
择其中之一安装。
个别补丁Patch 4518443修复BUG4518443,这一BUG的主要问题是TNS LISTENER在注册ONS(Oracle
Notification Services)的同时如果创建子进程,那么LISTENER会挂起(HANGUP)。
安装时,首先,从metalink下载补丁的压缩文件p4518443_10105_LINUX.zip.将此文件解压缩至某一目录
中。解压缩后,这一补丁的所有文件都在子目录4518443下,目录名就是个别补丁的补丁号,opatch依据目录
名获得信息,所以一定不要重命名子目录。
然后,在终端窗口中,执行cd命令移动到4518443子目录中,执行以下命令:
$ $ORACLE_HOME/OPatch/opatch apply
对inventory列表,确认安装操作:
$ $ORACLE_HOME/OPatch/opatch lsinventory
执行卸载命令时,也必须使4518443子目录成为当前目录。其中,Rollback命令需要两个参数:-id给出
个别补丁号;-ph 给出个别补丁解压缩后的路径。
$ $ORACLE_HOME/OPatch/opatch rollback -id 4518443 -ph /…/4518443
随后再对inventory列表,则会看到这一个别补丁已经被移去。
* 使用opatch显示已安装的版本信息
不需要启动数据库,执行加选项的对inventory的列表命令,可以得到已安装的软件的各个组件的详细版
本信息。
$ $ORACLE_HOME/OPatch/opatch lsinventory -detail
安全补丁CPU
一个CPU内包含了对多个安全漏洞的修复,并且也包括相应必需的非安全漏洞的补丁。CPU是累积型的,
只要安装最新发布的CPU即可,其中包括之前发布的所有CPU的内容。事实上,在CPU之前的安全漏洞修改除去
个别例外也被包括在CPU中。Oracle公司只对处于标准技术支持和延长支持期间的产品提供CPU更新,对处于
维持支持范围的产品不提供新的CPU.(对于9.2以前的版本,只对处于ECS和EMS期间的版本提供CPU更新。)
一般对当前补丁发行版及前一个版本提供CPU,但也有只限于当前补丁发行版的例外情形。也就是说,一般需
要先安装最新PSR后才可能安装CPU.由于是累积型的定期发布,所以对于某一平台的某一版本,如果两次CPU
发布期间没有发现新的安全漏洞,则新发布的CPU与前一版本完全相同。
在以下网址中可以找到CPU发布的信息,但是很遗憾,只有技术支持签约用户才可以从metalink下载补丁
文件。
http://www.oracle.com/technology/deploy/security/alerts.htm
Oracle公司制定的CPU的发布日期大约在一月、四月、七月和十月的最接近15的星期二。
对于每一个CPU,附有相应的说明文档(Critical Patch Update Note),其中介绍安装过程和注意事项
,在安装之前应认真阅读此文档。同样也存在文档“Oracle Critical Patch Update MM YYYY Known Issues
for Oracle Database”,其中列出了说明文档中没有给出的新信息。
在安装时,首先下载压缩文件p5225797_10105_LINUX.zip,解压缩到与其它个别补丁相同的目录下。检
查其发行说明时,发现要求opatch版本比现已安装版本要高,下载安装指定版本opatch.进入子目录5225797
(这是此安全补丁的补丁号),执行apply命令。
$ $ORACLE_HOME/OPatch/opatch apply
打开此次安装生成的日志文件,其中没有错误信息出现。执行inventory列表命令确认安装:
$ $ORACLE_HOME/opatch lsinventoryopatch作用
opatch是用于维护"个别"补丁的,有人称其为interim path或是one-off patch
以解决TA ENQ AND US ENQ DEADLOCK DURING TRANSACTION RECOVERY IN RAC问题的interim patch 3777178为例,
安装及rollback的命令如下:
install:
oracle>unzip p3777178_9206_HP64.zip
oracle>cd 3777178
oracle>opatch apply
rollback:
oracle>cd 3777178
oracle>opatch rollback -id 3777178
查看:
如下命令可以看到已经安装了哪些interim patch
[oracle@mysql2 ~]$ /u01/app/oracle/product/10.2.0/db_2/OPatch/opatch lsinventory
不断的在opatch后面加-h可以看到这个命令更加详细的选项:
看一下lsinventory后面有哪些选项:
[oracle@mysql2 ~]$ /u01/app/oracle/product/10.2.0/db_2/OPatch/opatch lsinventory -h
1. 环境介绍
XXXX综合管理信息系统主机放在XXXX,数据库平台硬件架构如下:
数据库主机:两台IBMp5 570(jcczxt1、jcczxt2)安装AIX5L ML 5306 通过IBM HACMP构成双机热备。
数据库平台:Oracle Server - Enterprise Edition - Version: 9.2.0.8
2.故障描述
2008年12月10号上午9:00值班人员接到用户反应应用出错无法存盘。前台出现的错误信息如下:
ORA-01115:IO error reading block from file 6 (block #2707)
ORA-01110: data file 6 : ‘/oradata/smis1.dbf’
ORA-27091: skgfqio :unable to quere I/O
ORA-27072: skgfdisp : I/O error
IBM AIX RISC System/6000 Error : 5: I/O error
此时数据库管理员重新启动数据库,前台用户反应应用可能正常运行,问题解决。数据库管理员在检查主机日志时没有发现任何硬件故障问题,在检查数据库日志时也没有任何错误提示,用Oracle的实用程序DBV对数据库文件进行检查没有发现坏块。
2008年12月11日下午18:30用户又报同样的错误,此时DBA重新启动数据库和应用,问题解决。2008-12-11 8:50用户又报同样的。DBA重新启动数据库和应用,问题解决。
3.故障的定位
第一步,通过errpt检查主机的日志确认主机没有硬件问题,磁盘没有损坏。第二步,通过检查数据库的日志文件(alertSID.log)也没有相关的错误提示,初步判定不是数据库的问题。第三步,通过Oracle的实用程序DBV对数据库文件进行检查没有发现坏块。此时可以确认不是硬件问题,是软件的问题。第四步,综合管理信息系统是2008年10月18号上线,一直都稳定运行,没有出现过类似的情况,可以排除是应用程序的问题。第五步,通过上metalink网站查询与ORA-01115相关的信息,发现有大量的资讯,其中的故障描述与我们的情况一致,“由于在AIX5L的操作系统上Oracle由于无法获取正确的data
block头信息,从而导致DBWn进程写硬盘失败,Oracle数据库从8.1.7.4到10.2.0.2都有此问题,是由于Oracle的BUG导致,需要打一个Oracle的临时补丁”。此时问题可以定位为oracle在AIX5L平台上的BUG,需要加载一个Oracle的临时补丁patch 5496862。
4.Oracle术语解释
什么叫interim patch ?
Interim patch是一次性的补丁针对特定的情况下触发的Bug,没有经过Oracle系统的认证,Oracle会根据Bug的严重性和需要在下一次的patch set中包含此Interim patch。Interim patch对环境和版本有特定的要求,即不同操作系统平台和数据库版本的会有不同的Interim patch。如Interim patch 5496862会。
什么叫Opatch?
Opatch是oracle支持的Oracle临时补丁的安装实用程序。是针对Oracle数据库第二版9.2.0后安装临时补丁。Opatch是一个基于Perl的程序。
如何安装Opatch?
从metalink上选择补丁程序,选择简单搜索,输入patch号6880880选择相应的操作系统平台,查询结果会显示所有可用版本的optach,下载版本号10.1就行。将下的压缩文件上传到数据库主机,将压缩文件复制到$ORACLE_HOME目录下,用unzip工具解压此压缩文件。具体命令如下:
#cp /tmp/p6880880_101000_AIX64-5L.zip $ORACLE_HOME
#chown oracle:dba $ORACLE_HOME/p6880880_101000_AIX64-5L.zip
以oracle用户解压此文件
$ cd $ORACLE_HOME
$unzip p6880880_101000_AIX64-5L.zip
5.解决方法
1)从metalink上选择补丁程序,选择简单搜索,输入patch号5496862,选择平台为IBM AIX Based System(64bit),下载Oracle9.2.0.8对应的patch大小为24K。
2)将patch 5496862上传到数据库主机(host2)
3)在jcczxt2主机上加载此patch
因综合管理信息系统采用双机热备方式,所以备机(host2)没有数据库应用。所以我们可以在不停下数据库的情况下加载patch 5496862。详细步骤如上:
以oracle数据库用户执行下面的命令:
$cp /tmp/p5496862_92080_AIX64-5L.zip /oracle/patch
$cd /oracle/patch
$unzip p5496862_92080_AIX64-5L.zip
$cd 5496862
$$ORACLE_HOME/Opatch/opatch install
提示要求输入metalink的帐号和密码,可能随便输入。
提示“ Please shut down Oracle instances running out of this ORACLE_HOME”输入’Y’
此时oracle会开始安装patch,因为要重新链接lib,所以要花几分钟时间,在安装完毕后会出现“OPatch succeeded”提示。
4)将数据库切换到jcczxt2
5)在host1主机上采用相同的方法上加载patch 5496862
http://www.linuxidc.com/Linux/2012-08/69190.htm
http://www.233.com/oracle/zonghe/20100926/10494228.html
文章1:
环境:
OS:Red Hat Linux As 5
DB:11.2.0.1
今天在安装好11gR2软件后准备通过dbca创建数据库,执行dbca的时候包如下错误:
[Oracle@primary ~]$dbca
Oracle Net Services Configuration:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xa44b13a8, pid=2973, tid=3086891216
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_17-b02 mixed mode)
# Problematic frame:
# C [libnnz11.so+0x3c3a8]
#
# An error report file with more information is saved as hs_err_pid2973.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
网上搜索了很多相关的帖子,基本上说的是64位的机器安装了32位的数据导致的,但我的机器是32位的,下载的oracle版本也是32位的,但也报这个错误.先不管了,按照网上说的需要打补丁p8670579_112010_LINUX.zip.
下载该补丁后,按照README.txt步骤将该补丁打上后执行dbca,呵呵,创建db的图形出来了,问题解决.
p8670579_112010_LINUX.zip下载:
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是www.linuxidc.com
具体下载目录在 /2012年资料/8月/28日/Oracle 11gR2执行DBCA报错误
步骤如下:
1.下载p8670579_112010_LINUX.zip,并上传到服务器上的目录/ftp
2.确认是否配置了ORACLE_HOME
[oracle@primary]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
3.检查perl的版本,需要5.00503以上的版本
[oracle@primary 8670579]$ perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
4.Verify the OUI Inventory.
$opatch lsinventory
5.解压缩补丁包
$unzip p8670579_112010_LINUX.zip
6.确保数据库已经停止
$cd /ftp/8670579
$opatch apply
README.txt里的说明如下:
[oracle@primary 8670579]$ more README.txt
=========================================================================
Interim Patch for Base Bug: 8670579
=========================================================================
Date: 25th February 2010
-------------------------------------------------------------------------
Platform Patch for : Linux x86
Product Patched : NETWORK
Product Version # : 11.2.0.1
RAC Rolling Installable : YES
Online Installable : NO
Bugs Fixed by this patch:
-------------------------
8670579 - DBBETA :NETCA/DBCA FAILED WITH HOTSPOT VIRTUAL MACHINE
Patch Preinstall Steps
----------------------
1. For non-recommended patches, you must have the exact symptoms
described in the service request (SR).
2. Confirm the version of Perl installed and configured for the ORACLE_HOME.
Oracle requires that all customers have at least Perl 5.00503 installed
and configured for patching activities inside the ORACLE_HOME. Follow
these steps to check the Perl version for the ORACLE_HOME being patched:
- source the ORACLE_HOME environment
- execute "perl -v"
- verify that the returned version of Perl is 5.00503 or higher
If the Perl configured for the ORACLE_HOME is not at 5.00503 or
higher, follow the directions in this metalink note to update to
a more recent version:
https://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_id=189489.1
3. Verify the OUI Inventory.
OPatch needs access to a valid OUI inventory to apply patches.
Validate the OUI inventory with the following command:
% opatch lsinventory
If the command errors out, contact Oracle Support and work to validate
and verify the inventory setup before proceeding.
4. Review and download the latest version of OPatch.
Oracle recommends that all customers be on the latest version of OPatch.
Please review the following metalink note and follow the instructions
to update to the latest version if needed:
https://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_id=224346.1
5. Confirm executables appear in your system PATH.
The patching process will use the unzip and the opatch executables. After
sourcing the ORACLE_HOME environment, confirm both of these exist before
continuing:
- "which opatch"
- "which unzip"
If either of these executables do not show in the PATH, correct the problem
before proceeding.
6. Create a location for storing the unzipped patch. This location
will be referred to later in the document as <PATCH_TOP>.
7. Unzip the patch zip file into the <PATCH_TOP>.
unzip -d <PATCH_TOP> <ZIP_FILE>
8. Shut down services running from the ORACLE_HOME.
Before applying this patch, do a clean shut down of all services
running from the ORACLE_HOME.
(a) In a non-RAC environment:
Shut down all services that are running from this ORACLE_HOME.
Confirm the return status from each shutdown command to verify
the shutdown is successful and there are no errors.
(b) In a RAC environment:
For each node in the RAC system, shut down the services for
the specific machine that are running from the ORACLE_HOME.
OPatch will be used on each node in the RAC system one at
a time. If this patch is not rolling RAC installable treat
it as a non-RAC environment and shut down all services.
As an example, in the case of a two node RAC system:
1. Stop instances running on node 1.
2. Run 'opatch apply <PATCH_TOP>/8670579' on node 1.
3. When the apply finishes, opatch asks for confirmation
before going on to apply the patch to node 2.
4. Start instances on node 1.
5. Stop instances running on node 2.
6. Ask opatch to continue to applying the patch to node 2.
7. Start instances on node 2.
9. Apply pre-requisite updates.
Patch Installation Steps:
-------------------------
1. Set your current directory to the directory where the patch is located.
% cd <PATCH_TOP>/8670579
2. Apply the patch.
Use the following command to apply the patch to the ORACLE_HOME:
% opatch apply
When OPatch starts, it will validate the patch and make sure there
are no conflicts with the software already installed in the ORACLE_HOME.
OPatch categorizes two types of conflicts:
(a) Conflicts with a patch already applied to the ORACLE_HOME
In this case, please stop the patch installation and contact
Oracle Support Services.
(b) Conflicts with subset patch already applied to the ORACLE_HOME
In this case, please continue the install, as the new patch
contains all the fixes from the existing patch in the ORACLE_HOME.
The subset patch will automatically be rolled back prior to the
installation of the new patch.
Patch Post Install Instructions:
--------------------------------
Patch Deinstallation Instructions:
----------------------------------
1. Make sure to follow the same pre-install steps when deinstalling
a patch. This includes verifying the inventory and shutting down
any services running from the ORACLE_HOME / machine before rolling
the patch back.
2. Change to the directory where the patch was unzipped.
% cd <PATCH_TOP>/8670579
3. Run OPatch to deinstall the patch.
% opatch rollback -id 8670579
注意opatch命令是在$ORACLE_HOME/OPatch/目录下,环境变量PATH中没有包含该目录的话,直接敲入opatch命令是提示找不到改命令的,这时需要将该目录加入到PATH中
-------------------------------------
参考文章2:
从9.2版开始,Oracle公司设计实现了个别补丁安装管理工具opatch.opatch使用一
个称为inventory的系统数据结构(严格说是与oui共享inventory),集中管理所有已安装的个别补丁;个别
补丁的安装和卸载都使用opatch命令完成,冲突检测也由opatch在安装时自动完成;提供列表命令可以很方
便得到已安装个别补丁的信息。
10g(10.1和10.2)版本中,opatch作为一个标准工具,在软件安装时自动安装。(安装在
$ORACLE_HOME/OPatch下。)而对于9.2版,需要从metalink下载opatch.无论数据库是哪一个版本,系统中是
否已经安装opatch,在使用之前,应从metalink下载最新版本的opatch.很遗憾,由于系统实现的问题,10.2
使用的opatch与之前版本(10.1和9.2)使用的opatch不兼容,不能混用,这一点必须注意。
opatch是使用perl编写的脚本程序(其中也使用JAVA API)。编程使用的perl版本是5.6版,虽然在5.6
之前的版本中也可运行,但应尽可能安装5.6或以上的版本的perl.对于DBA来说一个好消息是,如果安装9.2
版软件时保留了HTTP服务器,则在$ORACLE_HOME/Apache下会自动安装perl.(10g会自动安装配置perl和opatch.)
opatch命令格式为:opatch < command > [< command_options >] [ -h[elp] ]
命令有:apply(安装个别补丁)、rollback(卸载个别补丁)、lsinventory(对inventory进行列表)
、query(显示某一个别补丁的详细信息)、version(显示opatch版本信息)。在opatch目录下,有用户使
用指南文件(Users_Guide.txt),其中有详细的命令格式和使用示例,读者可以参考。Opatch执行操作时,
除在屏幕输出结果外,还生成日志文件。日志文件的路径和文件名格式如下:
$ORACLE_HOME/.patch_storage/< patch_id >/< action >-< patch_id >_< mm-dd-yyyy_hh-mi-ss>.log
其中“patch_id”是Oracle技术支持部门为个别补丁分配的编号。
* 个别补丁安装实例
沿用安装PSR实例中的环境。在安装PSR10.1.0.5后,检索metalink,发现若干在其之上的个别补丁。选
择其中之一安装。
个别补丁Patch 4518443修复BUG4518443,这一BUG的主要问题是TNS LISTENER在注册ONS(Oracle
Notification Services)的同时如果创建子进程,那么LISTENER会挂起(HANGUP)。
安装时,首先,从metalink下载补丁的压缩文件p4518443_10105_LINUX.zip.将此文件解压缩至某一目录
中。解压缩后,这一补丁的所有文件都在子目录4518443下,目录名就是个别补丁的补丁号,opatch依据目录
名获得信息,所以一定不要重命名子目录。
然后,在终端窗口中,执行cd命令移动到4518443子目录中,执行以下命令:
$ $ORACLE_HOME/OPatch/opatch apply
对inventory列表,确认安装操作:
$ $ORACLE_HOME/OPatch/opatch lsinventory
执行卸载命令时,也必须使4518443子目录成为当前目录。其中,Rollback命令需要两个参数:-id给出
个别补丁号;-ph 给出个别补丁解压缩后的路径。
$ $ORACLE_HOME/OPatch/opatch rollback -id 4518443 -ph /…/4518443
随后再对inventory列表,则会看到这一个别补丁已经被移去。
* 使用opatch显示已安装的版本信息
不需要启动数据库,执行加选项的对inventory的列表命令,可以得到已安装的软件的各个组件的详细版
本信息。
$ $ORACLE_HOME/OPatch/opatch lsinventory -detail
安全补丁CPU
一个CPU内包含了对多个安全漏洞的修复,并且也包括相应必需的非安全漏洞的补丁。CPU是累积型的,
只要安装最新发布的CPU即可,其中包括之前发布的所有CPU的内容。事实上,在CPU之前的安全漏洞修改除去
个别例外也被包括在CPU中。Oracle公司只对处于标准技术支持和延长支持期间的产品提供CPU更新,对处于
维持支持范围的产品不提供新的CPU.(对于9.2以前的版本,只对处于ECS和EMS期间的版本提供CPU更新。)
一般对当前补丁发行版及前一个版本提供CPU,但也有只限于当前补丁发行版的例外情形。也就是说,一般需
要先安装最新PSR后才可能安装CPU.由于是累积型的定期发布,所以对于某一平台的某一版本,如果两次CPU
发布期间没有发现新的安全漏洞,则新发布的CPU与前一版本完全相同。
在以下网址中可以找到CPU发布的信息,但是很遗憾,只有技术支持签约用户才可以从metalink下载补丁
文件。
http://www.oracle.com/technology/deploy/security/alerts.htm
Oracle公司制定的CPU的发布日期大约在一月、四月、七月和十月的最接近15的星期二。
对于每一个CPU,附有相应的说明文档(Critical Patch Update Note),其中介绍安装过程和注意事项
,在安装之前应认真阅读此文档。同样也存在文档“Oracle Critical Patch Update MM YYYY Known Issues
for Oracle Database”,其中列出了说明文档中没有给出的新信息。
在安装时,首先下载压缩文件p5225797_10105_LINUX.zip,解压缩到与其它个别补丁相同的目录下。检
查其发行说明时,发现要求opatch版本比现已安装版本要高,下载安装指定版本opatch.进入子目录5225797
(这是此安全补丁的补丁号),执行apply命令。
$ $ORACLE_HOME/OPatch/opatch apply
打开此次安装生成的日志文件,其中没有错误信息出现。执行inventory列表命令确认安装:
$ $ORACLE_HOME/opatch lsinventoryopatch作用
opatch是用于维护"个别"补丁的,有人称其为interim path或是one-off patch
以解决TA ENQ AND US ENQ DEADLOCK DURING TRANSACTION RECOVERY IN RAC问题的interim patch 3777178为例,
安装及rollback的命令如下:
install:
oracle>unzip p3777178_9206_HP64.zip
oracle>cd 3777178
oracle>opatch apply
rollback:
oracle>cd 3777178
oracle>opatch rollback -id 3777178
查看:
如下命令可以看到已经安装了哪些interim patch
[oracle@mysql2 ~]$ /u01/app/oracle/product/10.2.0/db_2/OPatch/opatch lsinventory
不断的在opatch后面加-h可以看到这个命令更加详细的选项:
看一下lsinventory后面有哪些选项:
[oracle@mysql2 ~]$ /u01/app/oracle/product/10.2.0/db_2/OPatch/opatch lsinventory -h
1. 环境介绍
XXXX综合管理信息系统主机放在XXXX,数据库平台硬件架构如下:
数据库主机:两台IBMp5 570(jcczxt1、jcczxt2)安装AIX5L ML 5306 通过IBM HACMP构成双机热备。
数据库平台:Oracle Server - Enterprise Edition - Version: 9.2.0.8
2.故障描述
2008年12月10号上午9:00值班人员接到用户反应应用出错无法存盘。前台出现的错误信息如下:
ORA-01115:IO error reading block from file 6 (block #2707)
ORA-01110: data file 6 : ‘/oradata/smis1.dbf’
ORA-27091: skgfqio :unable to quere I/O
ORA-27072: skgfdisp : I/O error
IBM AIX RISC System/6000 Error : 5: I/O error
此时数据库管理员重新启动数据库,前台用户反应应用可能正常运行,问题解决。数据库管理员在检查主机日志时没有发现任何硬件故障问题,在检查数据库日志时也没有任何错误提示,用Oracle的实用程序DBV对数据库文件进行检查没有发现坏块。
2008年12月11日下午18:30用户又报同样的错误,此时DBA重新启动数据库和应用,问题解决。2008-12-11 8:50用户又报同样的。DBA重新启动数据库和应用,问题解决。
3.故障的定位
第一步,通过errpt检查主机的日志确认主机没有硬件问题,磁盘没有损坏。第二步,通过检查数据库的日志文件(alertSID.log)也没有相关的错误提示,初步判定不是数据库的问题。第三步,通过Oracle的实用程序DBV对数据库文件进行检查没有发现坏块。此时可以确认不是硬件问题,是软件的问题。第四步,综合管理信息系统是2008年10月18号上线,一直都稳定运行,没有出现过类似的情况,可以排除是应用程序的问题。第五步,通过上metalink网站查询与ORA-01115相关的信息,发现有大量的资讯,其中的故障描述与我们的情况一致,“由于在AIX5L的操作系统上Oracle由于无法获取正确的data
block头信息,从而导致DBWn进程写硬盘失败,Oracle数据库从8.1.7.4到10.2.0.2都有此问题,是由于Oracle的BUG导致,需要打一个Oracle的临时补丁”。此时问题可以定位为oracle在AIX5L平台上的BUG,需要加载一个Oracle的临时补丁patch 5496862。
4.Oracle术语解释
什么叫interim patch ?
Interim patch是一次性的补丁针对特定的情况下触发的Bug,没有经过Oracle系统的认证,Oracle会根据Bug的严重性和需要在下一次的patch set中包含此Interim patch。Interim patch对环境和版本有特定的要求,即不同操作系统平台和数据库版本的会有不同的Interim patch。如Interim patch 5496862会。
什么叫Opatch?
Opatch是oracle支持的Oracle临时补丁的安装实用程序。是针对Oracle数据库第二版9.2.0后安装临时补丁。Opatch是一个基于Perl的程序。
如何安装Opatch?
从metalink上选择补丁程序,选择简单搜索,输入patch号6880880选择相应的操作系统平台,查询结果会显示所有可用版本的optach,下载版本号10.1就行。将下的压缩文件上传到数据库主机,将压缩文件复制到$ORACLE_HOME目录下,用unzip工具解压此压缩文件。具体命令如下:
#cp /tmp/p6880880_101000_AIX64-5L.zip $ORACLE_HOME
#chown oracle:dba $ORACLE_HOME/p6880880_101000_AIX64-5L.zip
以oracle用户解压此文件
$ cd $ORACLE_HOME
$unzip p6880880_101000_AIX64-5L.zip
5.解决方法
1)从metalink上选择补丁程序,选择简单搜索,输入patch号5496862,选择平台为IBM AIX Based System(64bit),下载Oracle9.2.0.8对应的patch大小为24K。
2)将patch 5496862上传到数据库主机(host2)
3)在jcczxt2主机上加载此patch
因综合管理信息系统采用双机热备方式,所以备机(host2)没有数据库应用。所以我们可以在不停下数据库的情况下加载patch 5496862。详细步骤如上:
以oracle数据库用户执行下面的命令:
$cp /tmp/p5496862_92080_AIX64-5L.zip /oracle/patch
$cd /oracle/patch
$unzip p5496862_92080_AIX64-5L.zip
$cd 5496862
$$ORACLE_HOME/Opatch/opatch install
提示要求输入metalink的帐号和密码,可能随便输入。
提示“ Please shut down Oracle instances running out of this ORACLE_HOME”输入’Y’
此时oracle会开始安装patch,因为要重新链接lib,所以要花几分钟时间,在安装完毕后会出现“OPatch succeeded”提示。
4)将数据库切换到jcczxt2
5)在host1主机上采用相同的方法上加载patch 5496862
相关文章推荐
- 关于使用CreateUserWinzard控件创建用户时出现连接数据库问题的解决方法
- 在windows xp下使用dbca创建数据库过程中出现的问题及解决方法
- IOS——从头介绍数据库sqlite3的创建,使用及可能出现的问题
- 关于在使用c3p0 连接池配置数据库连接时出现 com.mchange.v2.resourcepool.CannotAcquireResourceExceptiond问题的解答
- 关于Linux 下 使用JAVA出现中文小框框的问题
- 关于使用myeclipse创建web项目中可能出现的问题
- linux环境下调试嵌入式设备时出现Aborted、segmentation fault、卡死的问题以及关于指针使用的一点想法
- 《关于在MFC中使用ODBC方式连接数据库可能出现的问题》第一篇
- 使用linux客户端执行shell脚本创建数据库初始化数据库中文乱码问题
- 关于linux下DB2创建数据库报错问题
- 关于vmware软件菜单栏点击【虚拟机】->【安装VMware Tools】没反应安装失败的问题及Linux命令使用问题
- linux中使用Xmanager调dbca创建数据库
- 关于新手SQL Server 2008数据库的首次使用出现的问题
- 关于使用IoBuildAsynchronousFsdRequest创建读写IRP出现蓝屏(蓝屏错误码:0x000000BE)的问题
- 关于使用navicat for mysql在建立数据库连接时出现的2003 can't connect to mysql server on'localhost'(10038)问题
- 关于linux下DB2创建数据库报错问题
- 关于EF创建数据库出现“用户代码未处理”的问题
- 关于使用VS.Net2003调试器出现的问题及相关解决方法[转]
- 关于使用 jquery Validate 使用出现的问题
- 关于使用ISA代理导致一些网上银行出现不能正常打开的问题