记录oracle 9i for linux安装过程中几个错误

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:记录oracle 9i for linux安装过程中几个错误

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

最近因为一个测试环境需要oracle 9i,我在Oracle linux 4.8上安装,竟然遇到几个问题记录下:
1.运行runInstaller提示如下错误

[oracle@xifenfei Disk1]$ ./runInstaller
[oracle@xifenfei Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2012-03-04_09-32-16PM/jre/bin/java. Please wait...
Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2012-03-04_09-32-16PM/jre/lib/i386/libjava.so:
symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

解决方法:打上p3006854_9204_LINUX.zip补丁

[root@xifenfei tmp]$ unzip p3006854_9204_LINUX.zip
Archive:  p3006854_9204_LINUX.zip
   creating: 3006854/
  inflating: 3006854/rhel3_pre_install.sh
  inflating: 3006854/README.txt
[root@xifenfei 3006854]# cd 3006854
[root@xifenfei 3006854]# chmod +x rhel3_pre_install.sh
[root@xifenfei 3006854]# ./rhel3_pre_install.sh
Applying patch...
Ensuring permissions are correctly set...
Done.
Patch successfully applied

2.在Linking Oracle9i到63%时入到如下错误

解决办法:在/usr/bin目录下有gcc 和 gcc32两个文件,执行 mv gcc gcc296 和 mv gcc32 gcc,完成之后,retry安装界面

[root@xifenfei tmp]# cd /usr/bin
[root@xifenfei bin]# ls gcc*
gcc  gcc32  gcc4
[root@xifenfei bin]# mv gcc gcc296
[root@xifenfei bin]# mv gcc32 gcc

3.执行netca/dbca报如下错误

[oracle@xifenfei Disk1]$ dbca
/u01/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno,
version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
[oracle@xifenfei Disk1]$ netca
/u01/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libzip.so: symbol errno,
version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM

解决办法:在环境变量中加上LD_ASSUME_KERNEL=2.4.1

vi .bash_profile --加上下面语句
export LD_ASSUME_KERNEL=2.4.1
source ~/.bash_profile

RedHat 6.1安装Oracle 11.2.0.3

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:RedHat 6.1安装Oracle 11.2.0.3

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、操作系统版本
[root@xifenfei stage]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)
[root@xifenfei stage]# uname -a
Linux xifenfei 2.6.32-131.0.15.el6.i686 #1 SMP Tue May 10 15:42:28 EDT 2011 i686 i686 i386 GNU/Linux

二、安装数据库版本(安装后之后贴出来的)
[oracle@xifenfei database]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Nov 5 05:50:34 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$version;

BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 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

三、系统配置
1、检查相应的rpm包的情况(等于或者高于下面版本)
rpm –qa | grep pagename(grep是搜索)
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
numactl-devel-0.9.8.x86_64
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
pdksh-5.2.14-1
–这个包需要下载,安装前需要卸载掉ksh-20100621-6.el6包
rpm –e rpm -e ksh-20100621-6.el6

安装缺少的rpm包
rpm –ivh pagename(根据提示,如果缺少依赖包,也需要加上去)

2、添加组和用户
/usr/sbin/groupadd oinstall(添加oinstall组)
/usr/sbin/groupadd -g 502 dba(添加dba组)
/usr/sbin/useradd -u 502 -g oinstall -G dba oracle(添加用户oracle,主组oinstall,辅助组dba)
passwd oracle(修改oracle用户密码)

3、创建文件夹并修改组和用户所属关系和相关权限
mkdir -p /opt/oracle(创建文件u01/oracle)
chown -R oracle:oinstall /opt/oracle(使得/opt/oracle文件夹输入oracle用户和oinstall组)
chmod -R 775 /opt/oracle(修改u01文件夹访问权限)—可选(最好执行下)

4、添加/etc/hosts中dns解析信息
192.168.1.60                xifenfei

5、在/etc/security/limits.conf中添加用户限制信息
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack 10240

6、修改或者添加/etc/sysctl.conf中信息
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 1048576
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

注意注释掉
# Disable netfilter on bridges.
#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0
—/sbin/sysctl –p(重新加载这些参数,不用重启系统)

7、编辑vi /etc/profile
if [ $USER = "oracle" ]; then
   if [ $SHELL = "/bin/ksh" ];    then
     ulimit -p 16384
     ulimit -n 65536
   else
     ulimit -u 16384 -n 65536
   fi
fi
–注意空格,在用户切换时使用su – username,这样才会加载后面的环境变量的配置信息(不要使用su username切换)

8、配置环境变量
在oracle用户下的.bash_profile文件中添加下面信息
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=xff
PATH=$ORACLE_HOME/bin:$PATH
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH NLS_LANG

四、安装过程
1、执行 runInstaller –注意路径,选择只安装数据库软件
2、执行 netca 创建监听
3、执行 dbca 创建数据库

Oracle 10.2.0.x升级到11.2.0.3

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:Oracle 10.2.0.x升级到11.2.0.3

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、环境描述
[oracle@node1 ~]$ export ORACLE_SID=chf
[oracle@node1 ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.5.0 – Production on Fri Nov 4 08:59:58 2011
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> show parameter name;
 
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_file_name_convert                 string
db_name                              string      chf
db_unique_name                       string      chf
global_names                         boolean     FALSE
instance_name                        string      chf
lock_name_space                      string
log_file_name_convert                string
service_names                        string      chf
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 ~]$ source .bash_profile 
[oracle@node1 ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.5.0 – Production on Fri Nov 4 09:01:25 2011
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> show parameter name;
 
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_file_name_convert                 string
db_name                              string      ecp
db_unique_name                       string      ecp
global_names                         boolean     FALSE
instance_name                        string      ecp
lock_name_space                      string
log_file_name_convert                string
service_names                        string      ecp
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
[oracle@node1 ~]$ source ora11g.sh 
[oracle@node1 ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.3.0 Production on Fri Nov 4 09:00:42 2011
 
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
 
SQL> show parameter name;
 
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_file_name_convert                 string
db_name                              string      ora11g
db_unique_name                       string      ora11g
global_names                         boolean     FALSE
instance_name                        string      ora11g
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      ora11g
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

通过上面的资料可以看出,Oracle 10g中有两个实例分别是chf和ecp,Oracle 11g中有一个实例为ora11g,现在需要做的操作是升级Oracle 10g中的chf为11g


二、升级过程
1、执行11g中的dbua

[oracle@node1 ~]$ export DISPLAY=192.168.9.215:0.0
[oracle@node1 ~]$ dbua


选择需要升级数据库,这里选择chf

升级前可能存在问题,需要处理

Oracle Database Vault没有关闭(关闭后重新运行dbua),具体操作见:Disable/Enable Oracle Database Vault

相关选项

因为em配置需要监听,因为我不用em,所以忽略这些

提示升级间关闭归档

选择升级过程中是否移动数据文件和存储类型


dbua升级汇总

开始升级

提示em没有关闭,因为不用,不管它,最好是升级前关闭这些


升级完成

三、检查结果

[oracle@node1 ~]$ export ORACLE_SID=chf
[oracle@node1 ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.3.0 Production on Fri Nov 4 11:07:27 2011
 
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options
 
SQL> show parameter name;
 
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_file_name_convert                 string
db_name                              string      chf
db_unique_name                       string      chf
global_names                         boolean     FALSE
instance_name                        string      chf
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      chf

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

四、Oracle 10.2.0.5升级到11.2.0.3过程
1、在Oracle 10.2.0.5数据库所在的服务器上安装11.2.0.3数据库软件
2、在11.2.0.3的环境变量下,执行dbua,执行图形化数据库升级操作
3、后续工作:修改spfile中的compatible等操作

10.2.0.x升级到10.2.0.5.5

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:10.2.0.x升级到10.2.0.5.5

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、数据库10.2.0.x升级到10.2.0.5.5步骤
1、升级数据库到10.2.0.5.0
执行8202632升级补丁中的./runInstaller
执行dbua
 
2、升级opatch
使用6880880补丁替换原$ORACLE_HOME/OPatch目录
 
3、升级数据库到10.2.0.5.5
使用补丁12827745,执行$ORACLE_HOME/OPatch/opatch apply ./12827745
执行数据库升级
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> — Execute the next statement only if this is the first
PSU applied for 10.2.0.5 or this is the first PSU applied since 10.2.0.5.3.
SQL> @utlrp.sql
SQL> QUIT
 
二、升级过程中出现错误
1、opatch版本过低
严重:OPatch invoked as follows: 'apply ./ '
信息:
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.4.9
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/
opatch/opatch2011-11-03_12-43-59下午.log
 
Patch 12827745 requires OPatch version 10.2.0.5.0.
The OPatch version being used (10.2.0.4.9) doesn't meet the minimum version
required by the patch(es). Please download latest OPatch from My Oracle Support.
 
信息:系统无任何变化, OPatch 不会尝试还原系统
 
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 10.2.0.4.9
 
OPatch Version: 10.2.0.4.9
 
OPatch succeeded.
 
处理办法:升级opatch
下载补丁p6880880_102000_Linux-x86-64,备份原来$ORACLE_HOME/OPatch,然后用下载的补丁替换
[oracle@node1 opatch]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 10.2.0.5.1
 
OPatch Version: 10.2.0.5.1
 
OPatch succeeded.
 
2、检测补丁是否冲突
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch \
>prereq CheckConflictAgainstOHWithDetail -phBaseDir ./
Invoking OPatch 10.2.0.5.1
 
Oracle 中间补丁程序安装程序版本 10.2.0.5.1
版权所有 (c) 2010, Oracle Corporation。保留所有权利。
 
PREREQ session
 
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.5.1
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/
opatch/opatch2011-11-03_13-50-44下午.log
 
Patch history file: /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch_history.txt
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
3、CheckActiveFilesAndExecutables failed
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch apply 
Invoking OPatch 10.2.0.5.1
 
Oracle 中间补丁程序安装程序版本 10.2.0.5.1
版权所有 (c) 2010, Oracle Corporation。保留所有权利。
 
 
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.5.1
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch2011-11-03_13-39-44下午.log
 
Patch history file: /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch_history.txt
 
ApplySession 将中间补丁程序 '12827745' 应用到 OH '/opt/oracle/product/10.2.0/db_1'
 
Running prerequisite checks…
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
 
 
Following executables are active :
/opt/oracle/product/10.2.0/db_1/bin/oracle
在先决条件检查期间 ApplySession 失败:
Prerequisite check "CheckActiveFilesAndExecutables" failed.
系统无任何变化, OPatch 不会尝试还原系统
 
OPatch failed with error code 74
 
解决办法:关闭数据库相关程序
 
[oracle@node1 12827745]$  sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.5.0 – Production on Thu Nov 3 13:52:31 2011
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !  
[oracle@node1 ~]$ lsnrctl stop
[oracle@node1 ~]$ emctl stop dbconsole
 
4、@catbundle.sql psu apply报错
ORA-04045: errors during recompilation/revalidation of IS1OGG.DDLREPLICATION
ORA-04064: not executed, invalidated 
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06512: at line 870
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06512: at line 870
ORA-04045: errors during recompilation/revalidation of IS1OGG.DDLREPLICATION
ORA-04064: not executed, invalidated 
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06512: at line 870
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
 
解决方法:关闭ogg的ddl捕获
因为ddl捕获触发器,导致这些操作失败
ddl_disable.sql
升级完成后,开启ddl捕获触发器
ddl_enable.sql
 
三、opatch主要命令解释
1、查看升级是否成功
[oracle@node1 ~]$   $ORACLE_HOME/OPatch/opatch lsinv -bugs_fixed|grep PSU
                                                    ENCAPSULATED BY EXCEPTION HANDLING
9952230    12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.1 (INCLUDES CPUOCT2010)
10248542   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.2 (INCLUDES CPUJAN2011)
11724962   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.3 (INCLUDES CPUAPR2011)
12419392   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.4 (INCLUDES CPUJUL2011)
12827745   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.5 (INCLUDES CPUOCT2011)
 
2、检测补丁是否冲突
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch prereq  \
>CheckConflictAgainstOHWithDetail -phBaseDir ./
Invoking OPatch 10.2.0.5.1
 
Oracle 中间补丁程序安装程序版本 10.2.0.5.1
版权所有 (c) 2010, Oracle Corporation。保留所有权利。
 
PREREQ session
 
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.5.1
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/
opatch2011-11-03_13-50-44下午.log
 
Patch history file: /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch_history.txt
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
3、预演补丁实施
opatch apply -report
 
4、卸载补丁
opatch rollback -id 8350262

Oracle 小升级 opatch apply使用

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:Oracle 小升级 opatch apply使用

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

这里记录的是Oracle 升级到10.2.0.4后,出现EM不能正常启动情况下,Oracle提示需要打上Patch 8350262,下面是记录打补丁过程

[oracle@ocp ~]$ unzip ~/p8350262_10204_Generic.zip
Archive:  /home/oracle/p8350262_10204_Generic.zip
   creating: 8350262/
  inflating: 8350262/killDBConsole
   creating: 8350262/files/
   creating: 8350262/files/sysman/
   creating: 8350262/files/sysman/jlib/
   creating: 8350262/files/sysman/jlib/emCORE.jar/
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/
  inflating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/
  inflating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class
  inflating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class
   creating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/
  inflating: 8350262/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class
   creating: 8350262/files/sysman/jlib/emd_java.jar/
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/
  inflating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/
  inflating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/RootCert.class
  inflating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class
   creating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/
  inflating: 8350262/files/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class
  inflating: 8350262/killDBConsole.pl
  inflating: 8350262/README.txt
   creating: 8350262/etc/
   creating: 8350262/etc/xml/
  inflating: 8350262/etc/xml/ShiphomeDirectoryStructure.xml
  inflating: 8350262/etc/xml/GenericActions.xml
   creating: 8350262/etc/config/
  inflating: 8350262/etc/config/inventory
  inflating: 8350262/etc/config/actions
[oracle@ocp ~]cd 8350262
[oracle@ocp 8350262]$ $ORACLE_HOME/OPatch/opatch apply     --Note:$ORACLE_HOME/OPatch/opatch路径
Invoking OPatch 10.2.0.4.2
Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/oracle/app/10.2.0/db_1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /opt/oracle/app/10.2.0/db_1/oui
Log file location : /opt/oracle/app/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-10-17_18-11-40PM.log
ApplySession applying interim patch '8350262' to OH '/opt/oracle/app/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.4.0a...
Updating jar file "/opt/oracle/app/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/opt/oracle/app/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/opt/oracle/app/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/opt/oracle/app/10.2.0/db_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Updating jar file "/opt/oracle/app/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 "/opt/oracle/app/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 "/opt/oracle/app/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 "/opt/oracle/app/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@ocp 8350262]$ ../opatch lsinventory  --Note检测是否安装成功
Invoking OPatch 10.2.0.4.2
Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/oracle/app/10.2.0/db_1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /opt/oracle/app/10.2.0/db_1/oui
Log file location : /opt/oracle/app/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-10-17_18-18-34PM.log
Lsinventory Output file location : /opt/oracle/app/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-10-17_18-18-34PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):
Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.
Interim patches (1) :
Patch  8350262      : applied on Mon Oct 17 18:17:28 CST 2011
   Created on 14 Sep 2010, 04:59:44 hrs PST8PDT
   Bugs fixed:
     8350262
--------------------------------------------------------------------------------
OPatch succeeded.

p8350262_10204_Generic
p8350262_10205_Generic

checking network configuration requirements

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:checking network configuration requirements

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

最近准备考ocp,所以决定按照教程,从头到尾系统的学习一次oracle,也算是为了对得起考证的几千大洋。
在安装oracle 10g的过程中,遇到了checking network configuration requirements is: Not executed的错误提示。

没有执行网络检测,google下,发现是/etc/hosts中没有指定静态ip地址导致,检测/etc/hosts发现果真如此(好久没有装oracle 了,竟然忘记这个基础的东西)修改如下配置
127.0.0.1 ocp localhost.localdomain localhost
192.168.1.55 ocp.xifenfei.com
重新检测,显示正常

升级到Oracle 10.2.0.4

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:升级到Oracle 10.2.0.4

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、单实例升级先决条件:
1.表空间需求
确保system表空间至少有10M空间可用
2.系统参数:
确保参数SHARED_POOL_SIZE 和 JAVA_POOL_SIZE大于150MB以上,为加快升级速度,在系统内存可用的情况下,可临时调大这2个参数
SQL> SHOW PARAMETER SHARED_POOL_SIZE
SQL> SHOW PARAMETER JAVA_POOL_SIZE
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE=’200M’ SCOPE=spfile;
SQL> ALTER SYSTEM SET JAVA_POOL_SIZE=’200M’ SCOPE=spfile;
二、实施升级
1.关闭需要升级的实例
停止实例
SQL> shutdown immediate
停止与该实例相关的所有后台进程
$ emctl stop dbconsole
$ isqlplusctl stop
$ lsnrctl stop
2.备份Oracle Home 目录及数据库
tar -cvf $ORACLE_BASE /orabak/ –确保Oracle相关的所有配置都位于$ORACLE_BASE目录,如监听等
cp *.dbf con*.ora redo*.log /orabak/ –对数据库实施冷备
3.升级软件
./runIstanller –>oracle 账户
root.sh –>root 账户
4.更新数据字典
SQL> startup upgrade
SQL> spool patch.log
SQL> @?/rdbms/admin/catupgrd.sql –注9i 使用catpatch.sql
SQL> spool off
SQL> !egrep “ORA-|Error” patch.log -i
5.重编译失效对象:
sql>shutdown immediate
sql>startup
SQL>@?/rdbms/admin/utlrp.sql
6.修改兼容性参数
SQL> alter system set compatible=’10.2.0.4.0′ scope=spfile;
7.如果使用了恢复目录,则执行下面的命令
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
8.如果升级回退:
SQL> STARTUP DOWNGRADE
SQL> SPOOL downgrade.log
SQL> @catdwgrd.sql(10.2.10运行的是这个,而10.1降级用的是d92000.sql,即dold_release.sql)
SQL>spool off
SQL>shutdown immediate
9.重新启动数据库:
SQL> SHUTDOWN
SQL> STARTUP
$ lsnrctl start
$ isqlplusctl start
$ emctl start dbconsole
10.检查升级后的情况
SQL> col comp_name for a35
SQL> col comp_name for a30
SQL> col version for a10
SQL> select comp_name,version,status from sys.dba_registry;
COMP_NAME VERSION STATUS
———————————– ———- ———————-
Oracle Database Catalog Views 10.2.0.4.0 VALID
Oracle Database Packages and Types 10.2.0.4.0 VALID
Oracle Workspace Manager 10.2.0.4.3 VALID
JServer JAVA Virtual Machine 10.2.0.4.0 VALID
Oracle XDK 10.2.0.4.0 VALID
Oracle Database Java Packages 10.2.0.4.0 VALID
Oracle Expression Filter 10.2.0.4.0 VALID
Oracle Data Mining 10.2.0.4.0 VALID
Oracle Text 10.2.0.4.0 VALID
Oracle XML Database 10.2.0.4.0 VALID
Oracle Rule Manager 10.2.0.4.0 VALID
COMP_NAME VERSION STATUS
———————————– ———- ———————-
Oracle interMedia 10.2.0.4.0 VALID
OLAP Analytic Workspace 10.2.0.4.0 VALID
Oracle OLAP API 10.2.0.4.0 VALID
OLAP Catalog 10.2.0.4.0 VALID
Spatial 10.2.0.4.0 VALID
Oracle Enterprise Manager 10.2.0.4.0 VALID
17 rows selected.
SQL> select * from utl_recomp_errors;
no rows selected

crs 10.2.0.1 bug(公网ip为私有ip时)

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:crs 10.2.0.1 bug(公网ip为私有ip时)

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

当crs10.2.0.1公用网卡IP段使用10、172、192段(非路由网段)的时候
1、会出现以下两种情况:
1)最后检查时出现如下错误
Checking existence of VIP node application (required)
Check failed.
Check failed on nodes:
rac1,rac2
2)在rac2上执行root.sh脚本最后
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
rac1
rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
……
Timed out waiting for the CRS stack to start.
2、解决方法:
在root.sh在第二个节点执行完之后,以 root 用户身份在第二个节点上手动调用 VIPCA
# /u01/app/oracle/product/10.2.0/crs_1/bin/vipca
配置虚拟ip

redhat 4 安装 Oracle 10g

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:redhat 4 安装 Oracle 10g

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

必须安装包
binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1
用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
创建文件夹
mkdir -p /u01/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01
修改系统参数
vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
vi /etc/profile
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
设置环境变量
vi ~/.bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=orcl
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$PATH:$ORACLE_HOME/bin
export PATH NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID