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

Oracle升级(10.2.0.1—–>10.2.0.3)

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

标题:Oracle升级(10.2.0.1—–>10.2.0.3)

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

数据库版本linux 32位(10.2.0.1升级到10.2.0.3)
1、停止OEM/isqlplus/监听/DB实例
$ emctl stop dbconsole
$ isqlplusctl stop
$ lsnrctl stop
$ sqlplus / as sysdba
SQL> shutdown immediate;
2、升级Oracle软件
1) 备份ORACLE_HOME和oraInventory
升级前对要升级的ORACLE_HOME进行备份是必要的, 还有oraInventory目录, 一
旦升级失败便于回退
方法一,使用tar备份
$ cd $ORACLE_HOME/..
$ tar jcvf db_1_`date +%Y%m%d`.tar.bz2 db_1
$ cd $ORACLE_BASE
$ tar jcvf oraInventory_`date +%Y%m%d`.tar.bz2 oraInventory
方法二,使用cp备份
$ cd $ORACLE_HOME
$ cp -pr db_1 db_1_new (备份到新目录, 且保留mode,ownership,timestamps等信息)
$ cp -pr oraInventory oraInventory_new
2) 升级Oracle 软件
2.1)通过response文件开始升级, 升级时间大概2-3分钟.
$ cd /u01/software/10g/
$ unzip p5337014_10203_LINUX.zip
$ cd Disk1
注意升级前要保证/tmp空间有2.5G空余空间
$ ./runInstaller -silent -responseFile /u01/software/10g/DISK1/response/patchset.rsp
ORACLE_HOME=”/u01/app/oracle/product/10.2.0/db_1″
ORACLE_HOME_NAME=”OraDb10g_home1″ DECLINE_SECURITY_UPDATES=”true”
如果未使用默认的组oinstall, 则runInstaller命令后需再加一个参数:
UNIX_GROUP_NAME=”oinstall”
各参数含义如下:
-silent 表示以静默方式安装,不会有任何提示;
-responseFile 表示使用哪个响应文件,必需使用绝对路径;
ORACLE_HOME=”/u01/app/oracle/product/10.2.0/db_1″ oracle安装目录;
ORACLE_HOME_NAME=”OraDb10g_home1″ ORACLE_HOME名;
DECLINE_SECURITY_UPDATES=”true” 是否需要安全更新, true表示不需要,
否则会要求输入metalink账号和联网信息;(10.2.0.3中无此选项)
UNIX_GROUP_NAME=”oinstall” oracle用户用于安装软件的组名;
2.2)设置DISPLAY=192.168.0.1:0.0 (设置图形显示,用的是xmanager的passive接收)
注意: 你也可以直接用./runInstaller运行,安装程序会检查和提示你一步一步的升级完成
3) 运行root.sh和changePerm.sh
ü 升级结束后, 以root用户执行$ORACLE_HOME下的root.sh(如有提示则一直回车):
# /u01/app/oracle/product/10.2.0/db_1/root.sh
安装PatchSet后新增的文件或目录是限制访问的, 其它用户或第三方工具要访问这些文件时会提示错误,
所以要修改权限:
# su – oracle
$ cd $ORACLE_HOME/install
$ ./changePerm.sh
$ tail -50f /tmp/changePerm_err.log
3、升级数据库
$ lsnrctl start
确保内存足够
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE=’150M’ SCOPE=spfile;
SQL> ALTER SYSTEM SET JAVA_POOL_SIZE=’150M’ SCOPE=spfile;
$ sqlplus / as sysdba
SQL> startup upgrade; (以升级模式启动数据库)
SQL> SPOOL /tmp/patch102030.log
SQL> @?/rdbms/admin/catupgrd.sql (重建数据字典, 若有问题可重复执行)
SQL> SPOOL off
SQL> !egrep “ORA-|Error” /tmp/patch102050.log (查看是否有错误)
SQL> shutdown immediate;
SQL> startup;
SQL> @?/rdbms/admin/utlrp.sql (编译失效PLSQL包对象, 尽管第一次访问包是会自动编译, 还是推荐操作)
注意: 这个编译过程可能因为你数据库里面的对象问题,有一些错误,你需要在plsql下
执行: select * from UTL_RECOMP_ERRORS 检查无效的对象。有些是可以忽略的
4、开启OEM/isqlplus/监听
$ lsnrctl start
$ isqlplusctl start
$ emctl start dbconsole

Solaris 10安装oracle 10.2

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

标题:Solaris 10安装oracle 10.2

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

1、检查包
pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
如果提示:ERROR: information for “SUNWi1cs” was not found类似信息请执行2
2、安装缺少包
cd /cdrom/sol_10_910_x86/Solaris_10/Product
pkgadd -d . SUNWi1cs
3、修改内核参数
vi /etc/system
set noexec_user_stack=1
set semsys:seminfo_semmni = 100
set semsys:seminfo_semmns = 1024
set semsys:seminfo_semmsl = 256
set semsys:seminfo_semvmx = 32767
set shmsys:shminfo_shmmax = 4294967295
set shmsys:shminfo_shmmin = 1
set shmsys:shminfo_shmmni = 100
set shmsys:shminfo_shmseg = 10
4、创建用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /export/home/oracle -m -s /bin/bash oracle
passwd oracle
5、创建文件夹
mkdir -p /u01/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01
6、修改用户环境变量
vi .profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=orcl
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$PATH:$ORACLE_HOME/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/bin
TEMP=/tmp
TMPDIR=/tmp
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/lib64:/usr/local/lib
export TMPDIR TEMP PATH NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH
7、开始安装
su – oracle
export DISPLAY=192.168.1.1:0.0
/tmp/database/runInstaller
note:使用xmanager映射出图形界面

linux上安装oracle10g注意事项

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

标题:linux上安装oracle10g注意事项

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

1、如果hosts文件中不含localhost,在启动listener是报错:
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
需要在 Listener文件中添加SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF,这个为oracle10g上的bug,有补丁可以解决
2、修改主机名步骤
第一步:
#hostname oratest
第二步:
修改/etc/sysconfig/network中的hostname
第三步:
修改/etc/hosts文件
3、listener中的ip地址不能为127.0.0.1/localhost(最好直接使用网卡ip地址),不然不能被该主机外的其他主机访问
4、修改主机名后,要在hosts文件中做对应修改,不然重启oracle后会报错:
ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], []