Oracle 11g单实例GI and DB升级
来源:互联网 发布:qq炫舞 mac 编辑:程序博客网 时间:2024/05/31 19:10
1. 升级Grid Infrastructure
1.1 升级前准备
1.1.1 软件准备
这个当然不用多说:下载、上传到服务器、解压
1.1.2 新建GI的新HOME
mkdir -p /u01/app/11.2.0.4/grid
chown -R grid:oinstall /u01/app/11.2.0.4
chmod -R 775 /u01/app/11.2.0.4
1.2 进行升级
[root@Oracle-LAB app]# su - grid
[grid@Oracle-LAB ~]$ cd /software/grid/
[grid@Oracle-LAB grid]$ ./runInstaller
根据以上提示执行:
[root@Oracle-LAB /]#/u01/app/grid/product/11.2.0.4/grid/rootupgrade.sh
Performing root user operation for Oracle 11g
The following environment variables are setas:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/grid/product/11.2.0.4/grid
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
The contents of "dbhome" have notchanged. No need to overwrite.
The contents of "oraenv" have notchanged. No need to overwrite.
The contents of "coraenv" have notchanged. No need to overwrite.
Entries will be added to the /etc/oratab fileas needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of root script.
Now product-specific root actions will beperformed.
Using configuration parameter file:/u01/app/grid/product/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
ASM Configuration upgraded successfully.
Creating OCR keys for user 'grid', privgrp'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp'root'..
Operation successful.
CRS-4664: Node oracle-lab successfully pinned.
Replacing Clusterware entries in inittab
Replacing Clusterware entries in inittab
oracle-lab 2014/01/03 13:25:23 /u01/app/grid/product/11.2.0.4/grid/cdata/oracle-lab/backup_20140103_132523.olr
oracle-lab 2013/12/02 17:22:18 /u01/app/11.2.0/grid/cdata/oracle-lab/backup_20131202_172218.olr
Successfully configured Oracle GridInfrastructure for a Standalone Server
完成后在当前GRID帐号下运行:crsctl query has softwareversion查看当前版本信息。
[grid@Oracle-LAB grid]$ crsctl query has softwareversion
Oracle High Availability Services version onthe local node is [11.2.0.4.0]
1.3 修改改Grid帐号下的ORACLE_HOME值
[root@Oracle-LAB/]# gedit /home/grid/.bash_profile
ORACLE_SID=+ASM
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2.0.4/grid
PATH=$PATH:$ORACLE_HOME/bin
export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME
1.4 重启oracle
[root@Oracle-LAB /]# cd/u01/app/11.2.0.4/grid/bin
[root@Oracle-LAB bin]# ./crsctlstop has
CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'oracle-lab'
CRS-2673: Attempting to stop'ora.LISTENER.lsnr' on 'oracle-lab'
CRS-2673: Attempting to stop 'ora.DATA01.dg'on 'oracle-lab'
CRS-2673: Attempting to stop 'ora.FRA.dg' on'oracle-lab'
CRS-2673: Attempting to stop 'ora.orcl.db' on'oracle-lab'
CRS-2677: Stop of 'ora.DATA01.dg' on'oracle-lab' succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'oracle-lab'succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oracle-lab'succeeded
CRS-2677: Stop of 'ora.orcl.db' on'oracle-lab' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on'oracle-lab'
CRS-2677: Stop of 'ora.DATA.dg' on'oracle-lab' succeeded
CRS-2679: Attempting to clean 'ora.DATA.dg' on'oracle-lab'
CRS-2681: Clean of 'ora.DATA.dg' on'oracle-lab' succeeded
CRS-2673: Attempting to stop 'ora.asm' on'oracle-lab'
CRS-2677: Stop of 'ora.asm' on 'oracle-lab'succeeded
CRS-2673: Attempting to stop 'ora.cssd' on'oracle-lab'
CRS-2677: Stop of 'ora.cssd' on 'oracle-lab'succeeded
CRS-2673: Attempting to stop 'ora.evmd' on'oracle-lab'
CRS-2677: Stop of 'ora.evmd' on 'oracle-lab'succeeded
CRS-2793: Shutdown of Oracle High AvailabilityServices-managed resources on 'oracle-lab' has completed
CRS-4133: Oracle High Availability Serviceshas been stopped.
[root@Oracle-LAB bin]#./crsctl start has
CRS-4123: Oracle High Availability Serviceshas been started.
完成重启后检查版本:
[root@Oracle-LAB bin]# ./crsctlquery has releaseversion
Oracle High Availability Services releaseversion on the local node is [11.2.0.4.0]
2. 升级数据库软件
2.1 升级前准备
2.1.1 软件准备
这个当然不用多说:下载、上传到服务器、解压
2.1.2 新建DB软件的新HOME
mkdir -p/u01/app/oracle/product/11.2.0.4/dbhome_1
chown -R oracle:oinstall/u01/app/oracle/product/11.2.0.4
chmod -R 775 /u01/app/oracle/product/11.2.0.4
2.1.3 检查Oracle软件版本
[oracle@Oracle-LAB ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on MonJan 6 13:08:12 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic StorageManagement, OLAP, Data Mining
and Real Application Testing options
2.1.4 备份数据库
不再详述。
2.2 进行升级
[oracle@Oracle-LAB ~]$ unset ORACLE_BASE
[oracle@Oracle-LAB ~]$ unset ORACLE_HOME
[oracle@Oracle-LAB ~]$ unset ORACLE_SID
[oracle@Oracle-LAB ~]$ cd /software/database/
[root@Oracle-LAB ~]# /u01/app/oracle/product/11.2.0.4/dbhome_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are setas:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.4/dbhome_1
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
The contents of "dbhome" have notchanged. No need to overwrite.
The contents of "oraenv" have not changed.No need to overwrite.
The contents of "coraenv" have notchanged. No need to overwrite.
Entries will be added to the /etc/oratab fileas needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of root script.
Now product-specific root actions will beperformed.
Finished product-specific root actions.
3. 升级数据库
3.1 升级前检查
进入新目录下执行utlu112i.sql来进行升级前的检查:
[root@Oracle-LAB~]# su - oracle
[oracle@Oracle-LAB~]$ /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 6 13:33:40 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bitProduction
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> @/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 01-06-2014 13:34:41
Script Version: 11.2.0.4.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: ORCL
--> version: 11.2.0.3.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V14
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 932 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 701 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
--> EXAMPLE tablespace is adequate for the upgrade.
.... minimum required size: 310 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora orspfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded orinstalled]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Your recycle bin is turned on and currently contains noobjects.
.... Because it is REQUIRED that the recycle bin be empty prior toupgrading
.... and your recycle bin is turned on, you may need to execute thecommand:
PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: --> Database contains schemas with objects dependent onDBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure NetworkACLs.
.... USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTEdbms_stats.gather_dictionary_stats;
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT(translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
SELECT(translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) ='_TRACE_EVENTS' AND isdefault='FALSE'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
3.2 运行DBUA来升级数据库
以Oracle帐户进入新目录运行DBUA
[root@Oracle-LAB/]# su - oracle
[root@Oracle-LAB ~]$ cd /u01/app/oracle/product/11.2.0.4/dbhome_1/bin
[oracle@Oracle-LABbin]$ ./dbua
3.3 修改Oracle帐号的ORACLE_HOME
[root@Oracle-LAB/]# gedit /home/oracle/.bash_profile
export PATH
ORACLE_SID=ORCL
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1
PATH=$PATH:$ORACLE_HOME/bin
export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME
- Oracle 11g单实例GI and DB升级
- Oracle 11g R2 GI and DB Installation on AIX 6.1L
- Oracle DataBase单实例使用ASM案例(2)--Oracle 11g之GI安装
- oracle 11g GI deinstall
- ORACLE 11g RAC测试环境GI和DB打 PSU操作流程
- 11G GI deinstall RAC01 and RAC02
- 安装 Oracle 11g DB
- oracle 11G GI 如何手动添加vip 资源
- Oracle 11g安装GI CRS-4124 解决方案
- Oracle 11g单实例使用ASM注意事项
- oracle 11g rac 恢复到单实例
- ORACLE 11g rac+单实例数据库构建dataguard
- Oracle 11G 通过 duplicate 配置单实例DataGuard
- oracle 11g asm单实例迁移文件系统
- linux下卸载oracle 11g单实例数据库
- oracle 11g 单实例安装(suse)
- ORACLE 11G双节点RAC配置单实例DG
- oracle 11G 软件克隆安装(单实例和RAC)
- 详解Android中AsyncTask的使用
- va_start和va_end使用详解
- JS脚本动态加载,以及加载完成后执行回调
- 花开花谢 岁月如梭
- sort与qsort的cmp区别
- Oracle 11g单实例GI and DB升级
- 滚动控件(ScrollBar)
- SOA 好好了解下
- jquery 打开新窗口链接
- PhoneGap快速上手 - 基于eclipse环境搭建、部署(图解)
- 设定UISegmentControl的文字属性
- VS2010的一些细节点(1)--VC编译器、V90、v100的含义
- 利用Ajax 、iframe 在当前页面下载
- One sql performance tuning